[.feemcube {albatross} | R Documentation |
Extract or replace parts of FEEM cubes
Description
Extract or replace single intensities, vectors of them, whole FEEM spectra or even data cubes or their parts from a FEEM cube.
Usage
## S3 method for class 'feemcube'
x[i, j, k, drop = TRUE]
## S3 replacement method for class 'feemcube'
x[i, j, k] <- value
Arguments
x |
A FEEM cube object. |
i , j , k |
Row, column and sample indices, respectively. As usual, may be integer, logical or character vectors. Omitting a parameter results in choosing the whole axis. |
drop |
Coerce result to the lowest possible dimension (dropping the
|
value |
An array-like object to assign values from. When assigning from FEEM or FEEM cube objects, wavelengths are required to match and warnings are issued if scale factors don't match. Use vector subsetting (zero or one argument inside the brackets) to disable the check. |
Value
For [
: If choosing multiple values along each axis or
drop
is FALSE
, a FEEM cube object. If choosing only one
sample but multiple wavelengths, a FEEM object. Otherwise, a named
numeric matrix or vector, depending on the dimensions chosen.
For [<-
: a FEEM cube object.
See Also
Examples
z <- feemcube(array(1:385, c(5, 7, 11)), 1:5, 1:7, 1:11)
str(z[1:4, 1:2, 1:2])
z[2:3, 4:5, 3] <- feem(matrix(1:4, 2), 2:3, 4:5, 3)
z[,,3]