Learn R Programming

neuroim2 (version 0.8.5)

which_dim: Find Dimensions of a Given Axis

Description

This function returns the dimension of the specified axis for a given object, such as a matrix or an array.

Usage

which_dim(x, axis)

# S4 method for NeuroSpace,NamedAxis which_dim(x, axis)

Value

An integer representing the dimension index of the specified axis for the object x.

Arguments

x

The NeuroSpace object

axis

The NamedAxis to find

Examples

Run this code

x <- NeuroSpace(c(10,10,10), spacing=c(1,1,1))
which_dim(x, x@axes@j) == 2

Run the code above in your browser using DataLab