This function builds tagged 3-dimensional arrays of fluorescence excitation-emission spectra. Given a list of FEEM objects, it can determine the range of their wavelengths. Otherwise, the object is created from the supplied numeric array and vectors of wavelengths and sample names.
feemcube(x, …)
# S3 method for list
feemcube(x, all.wavelengths, …)
# S3 method for array
feemcube(x, emission, excitation, scales, names = NULL, …)
A list of FEEM objects, possibly named.
Alternatively, a numeric array.
Logical, a flag specifying whether to include wavelengths not present
in all of the samples. If FALSE
, only those wavelength
present in all of the samples are included.
Numeric vector of emission wavelengths. Should correspond to the
first dimension of the array x
.
Numeric vector of excitation wavelengths. Should correspond to the
second dimension of the array x
.
Numeric vector of scale factors corresponding to the spectra in the
array. Should correspond to the third dimension of the array
x
. If missing, assumed to be all \(1\).
Character vector of names of the samples. Should correspond to the
third dimension of the array x
.
Additional arguments besides those specified above are not allowed.
A FEEM data cube is a numeric three-dimensional array with the following attributes:
Fluorescence emission wavelengths corresponding to the first dimension of the array, nm.
Fluorescence excitation wavelengths corresponding to the second dimension of the array, nm.
Dimension names, copies of information above. Used only for presentation purposes.
Scale factors of the samples, corresponding to the third dimension of the array. Assumed to be \(1\) missing if not specified by the user.
feemcube.list
can be used to build FEEM data cubes from lists
of FEEM objects even if their wavelength grids do not exactly match.
The missing wavelengths are set to NA
.
# NOT RUN {
feemcube(array(1:24, 4:2), 1:4, 1:3) # array form
feemcube(replicate(2, feem(matrix(1:6, 2), 1:2, 1:3), FALSE), TRUE) # list form
# }
Run the code above in your browser using DataLab