Wednesday 5 April 2017

Collections in R

How to get number of rows/columns in data object x?
nrow(x)
ncol(x)


How to get first/last N elements of some data object x?
head(x)
tail(x)


Reference:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/nrow.html
https://rdrr.io/r/utils/head.html

No comments:

Post a Comment