Learn R Programming

neuroim2 (version 0.8.5)

ndim: Extract the number of dimensions of an object

Description

Extract the number of dimensions of an object

Usage

ndim(x, ...)

# S4 method for ClusteredNeuroVec ndim(x)

# S4 method for NeuroObj ndim(x)

# S4 method for NeuroSpace ndim(x)

Value

An integer representing the number of dimensions in x.

Arguments

x

n-dimensional object

...

additional arguments

Examples

Run this code

x = NeuroSpace(c(10,10,10), spacing=c(1,1,1))
ndim(x) == 3
x = NeuroSpace(c(10,10,10,3), spacing=c(1,1,1))
ndim(x) == 4

Run the code above in your browser using DataLab