size: Size of matrix or vector

View source: R/utils.R

sizeR Documentation

Size of matrix or vector

Description

Return the size of a matrix or vector as (Nrows, Ncolumns) Are you tired of getting NULL when you run dim() on a vector?

Usage

size(x, verbosity = 1L)

Arguments

x

Vector or matrix input

verbosity

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

Value

Integer vector of length 2: c(Nrow, Ncols), invisibly

Author(s)

EDG

Examples

## Not run: 
x <- rnorm(20)
size(x)
# 20  1
x <- matrix(rnorm(100), 20, 5)
size(x)
# 20  5

## End(Not run)

egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.