Learn R Programming

Orcs (version 1.2.3)

OrcsCppFun: Dimensions of a data.frame

Description

Similar to base-R nrow(), ncol() and dim(), this set of functions let's you retrieve the number of rows and columns of a data.frame.

Usage

nrowC(x)

ncolC(x)

dimC(x)

Value

dimC() returns an integer vector of length 2 (number of rows and columns); nrowC() (or ncolC()) returns the number of rows (or columns) as a single integer.

Arguments

x

A data.frame.

Functions

  • nrowC():

  • ncolC():

  • dimC():

Author

Florian Detsch

Examples

Run this code
dat <- data.frame(a = 1:4, b = 2:5, c = 3:6)

nrowC(dat)



Run the code above in your browser using DataLab