Description Usage Arguments Details Examples
Generic functions to apply a function to each series of a 4D image That is, if the 4th dimension is 'time' each series is a 1D time series.
1 2 3 4 5 6 7 8 9 | eachSeries(x, FUN, withIndex, ...)
## S4 method for signature 'SparseBrainVector,'function',logical'
eachSeries(x, FUN,
withIndex = FALSE, ...)
## S4 method for signature 'BrainVector,'function',missing'
eachSeries(x, FUN,
withIndex = FALSE, ...)
|
x |
a four dimensional image |
FUN |
a |
withIndex |
whether the index of the series is supplied as the second argument to the function |
... |
additional arguments |
when x
is a SparseBrainVector
eachSeries
only iterates over nonzero series.
1 2 3 | bvec <- BrainVector(array(rnorm(24*24*24*24), c(24,24,24,24)), BrainSpace(c(24,24,24,24), c(1,1,1)))
res <- eachSeries(bvec, mean)
length(res) == 24*24*24
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.