Learn R Programming

rtemis (version 1.4.3)

size: Size of object

Description

Returns the size of an object

Usage

size(x, verbosity = 1L)

Value

Integer vector with length equal to the number of dimensions of x, invisibly.

Arguments

x

any object with length() or dim().

verbosity

Integer: Verbosity level. If > 0, print size to console

Author

EDG

Details

If dim(x) is NULL, returns length(x).

Examples

Run this code
x <- rnorm(20)
size(x)
# 20
x <- matrix(rnorm(100), 20, 5)
size(x)
# 20  5

Run the code above in your browser using DataLab