Learn R Programming

neuroim2 (version 0.8.5)

dim_of: Get the length of a given dimension of an object

Description

This function returns the length of a given axis (dimension) of an object. The axis can be specified using its position or name.

Usage

dim_of(x, axis)

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

Value

An integer representing the length of the specified axis of x.

Arguments

x

The NeuroSpace object

axis

The NamedAxis to query

Examples

Run this code

x <- NeuroSpace(c(10,10,10), spacing=c(1,1,1))
stopifnot(dim_of(x, x@axes@i) == 10)

Run the code above in your browser using DataLab