R - Dimension (Dim)

Card Puncher Data Processing

About

dim function

Example

df = data.frame(col1=1:5,col2=5:1,col3=6:10)
df
col1 col2 col3
1    1    5    6
2    2    4    7
3    3    3    8
4    4    2    9
5    5    1   10

dim(df)
[1] 5 3





Discover More
Card Puncher Data Processing
R - (Object|Variable|Symbol)

R provides a number of specialized objects. They are created (instantiated), used and referenced through variable (known as symbol). When you read the term object in the documentation, you can interchange...
Card Puncher Data Processing
R - Matrix

The matrix object in R is an array of two dimensions with the same class (data type). You can create a matrix with three methods: the matrix method the columns and rows bindings methods the...
Card Puncher Data Processing
R - Subset Operators (Extract or Replace Parts of an Object)

In the Data Manipulation category, you have the subset operators: [ [[ $ This operators acts on: vectors, matrices, arrays lists data.frame to extract or replace parts. See also:...



Share this page:
Follow us:
Task Runner