size: Gets the size of an object

Description Usage Arguments Author(s) See Also Examples

Description

Gets the size of an object. If the object is a vector the length of the vector is returned. If the object is a matrix the dimension of the matrix is returned.

Usage

1
2
## Default S3 method:
size(x, ...)

Arguments

x

The object.

...

Not used.

Author(s)

Henrik Bengtsson

See Also

See also length() and dim().

Examples

1
2
  print(size(1:10))  # 10
  print(size(matrix(1:10, nrow=5)))  # 5 2

HenrikBengtsson/R.basic documentation built on May 6, 2019, 11:51 p.m.