R - Dimension (Dim)

> Procedural Languages > R

1 - About

dim function

Advertising

3 - 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