Extract the number of dimensions of an object
Source:R/all_generic.R
, R/axis.R
, R/neuro_obj.R
, and 1 more
ndim-methods.Rd
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)
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