Learn R Programming

matlab2r (version 1.5.0)

size: Size of an object

Description

This functions tries to replicate the behavior of the base function "size" in Matlab

Usage

size(x, d)

Value

A vector whose size is the number of dimensions of x and whose scale corresponds to the number of elements on (i.e. the size of) each dimension.

Arguments

x

object to be evaluated

d

dimension of object to be evaluated

Examples

Run this code
size(10)
size(1:4)
size(matrix(1:6, 2))
size(array(1:24, c(2, 3, 4)))

Run the code above in your browser using DataLab