Skip to contents

Extract the number of dimensions of an object

Usage

ndim(x, ...)

# S4 method for AxisSet
ndim(x, ...)

# S4 method for NeuroObj
ndim(x)

# S4 method for NeuroSpace
ndim(x)

Arguments

x

n-dimensional object

...

additional arguments

Value

The number of dimensions of the input object `x`

Examples


x = NeuroSpace(c(10,10,10), spacing=c(1,1,1))
ndim(x) == 3
#> [1] TRUE
x = NeuroSpace(c(10,10,10,3), spacing=c(1,1,1))
ndim(x) == 4
#> [1] TRUE