Learn R Programming

neuroim (version 0.0.6)

addDim: Generic function to add a dimension to an object

Description

Generic function to add a dimension to an object

add dimension to BrainSpace

Usage

addDim(x, n)
"addDim"(x, n)

Arguments

x
a dimensioned object
n
the size of the dimension to add

Examples

Run this code
x = BrainSpace(c(10,10,10), c(1,1,1))
x1 <- addDim(x, 10)
ndim(x1) == 4
dim(x1)[4] == 10

Run the code above in your browser using DataLab