which_dim {neuroim2}R Documentation

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 signature 'NeuroSpace,NamedAxis'
which_dim(x, axis)

Arguments

x

The NeuroSpace object

axis

The NamedAxis to find

Value

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

Examples


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

[Package neuroim2 version 0.8.1 Index]