Concatenate two objects in the time dimension
Source:R/all_generic.R
, R/latent_neurovec.R
, R/neurovec.R
, and 2 more
concat-methods.Rd
Concatenate two objects in the time dimension
Usage
concat(x, y, ...)
# S4 method for LatentNeuroVec,LatentNeuroVec
concat(x, y, ...)
# S4 method for NeuroVec,NeuroVol
concat(x, y, ...)
# S4 method for NeuroVol,NeuroVec
concat(x, y, ...)
# S4 method for NeuroVec,NeuroVec
concat(x, y, ...)
# S4 method for ROIVec,ROIVec
concat(x, y, ...)
# S4 method for DenseNeuroVol,missing
concat(x, y, ...)
# S4 method for DenseNeuroVol,DenseNeuroVol
concat(x, y, ...)
# S4 method for AbstractSparseNeuroVec,missing
concat(x, y, ...)
# S4 method for SparseNeuroVec,SparseNeuroVec
concat(x, y, ...)
Arguments
- x
the first object, typically
NeuroVol
orNeuroVec
- y
the second object, typically
NeuroVol
orNeuroVec
- ...
additional objects
Details
The x
and y
images must have compatible dimensions. a NeuroVol
can be concatenated to NeuroVec
, and vice versa. See examples.
Examples
bv1 <- NeuroVol(rep(1,1000), NeuroSpace(c(10,10,10), c(1,1,1)))
bv2 <- NeuroVol(rep(2,1000), NeuroSpace(c(10,10,10), c(1,1,1)))
bv3 <- concat(bv1,bv2)
inherits(bv3, "NeuroVec")
#> [1] TRUE
bv4 <- concat(bv3, bv1)
dim(bv4)[4] == 3
#> [1] TRUE
bv5 <- concat(bv1, bv3)
dim(bv4)[4] == 3
#> [1] TRUE
bv6 <- concat(bv4,bv5)
dim(bv6)[4] == 6
#> [1] TRUE