add_dim-methods: Generic function to add a dimension to an object

Description Usage Arguments Examples

Description

Generic function to add a dimension to an object

add dimension to NeuroSpace

Usage

1
2
3
4
add_dim(x, n)

## S4 method for signature 'NeuroSpace,numeric'
add_dim(x, n)

Arguments

x

a dimensioned object

n

the size of the dimension to add

Examples

1
2
3
4
x = NeuroSpace(c(10,10,10), c(1,1,1))
x1 <- add_dim(x, 10)
ndim(x1) == 4
dim(x1)[4] == 10

bbuchsbaum/neuroim2 documentation built on Oct. 26, 2019, 12:18 p.m.