feemcube {albatross}R Documentation

Data cubes of fluorescence excitation-emission matrices

Description

Given a list of feem objects or a 3-way array, build tagged 3-dimensional arrays of fluorescence excitation-emission spectra. Extract the data cube from the corresponding model objects. Transform the data cube into a list of feem objects.

Usage

  feemcube(x, ...)
  ## S3 method for class 'list'
feemcube(x, all.wavelengths, ...)
  ## S3 method for class 'array'
feemcube(x, emission, excitation, scales, names = NULL, ...)
  ## S3 method for class 'feemparafac'
feemcube(x, ...)
  ## S3 method for class 'feemsplithalf'
feemcube(x, ...)
  ## S3 method for class 'feemjackknife'
feemcube(x, ...)
  ## S3 method for class 'feemflame'
feemcube(x, ...)
  ## S3 method for class 'feemcube'
as.list(x, ...)

Arguments

x
feemcube

A list of FEEM objects, possibly named, or a numeric array.

Alternatively, a feemparafac, feemjackknife, feemsplithalf, or a feemflame object.

as.list.feemcube

A feemcube object.

all.wavelengths

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.

emission

Numeric vector of emission wavelengths. Should correspond to the first dimension of the array x.

excitation

Numeric vector of excitation wavelengths. Should correspond to the second dimension of the array x.

scales

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.

names

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.

Details

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 may be set to NA (all.wavelengths = TRUE) or omitted from the cube (all.wavelengths = FALSE). See feemgrid if you need to adjust the wavelength grid of a list of EEMs before making it into a FEEM cube.

feemcube.feemparafac, feemcube.jackknife, and feemcube.feemsplithalf return the data cube originally passed to the corresponding functions.

Value

A FEEM data cube is a numeric three-dimensional array with the following attributes:

emission

Fluorescence emission wavelengths corresponding to the first dimension of the array, nm.

excitation

Fluorescence excitation wavelengths corresponding to the second dimension of the array, nm.

dimnames

Dimension names, copies of information above. Used only for presentation purposes.

scales

Scale factors of the samples, corresponding to the third dimension of the array. Assumed to be 1 if not specified by the user.

as.list.feemcube: A named list of FEEM objects comprising x.

See Also

FEEM cube methods: [.feemcube, plot.feemcube, as.data.frame.feemcube, feemife, feemscale, feemscatter.

Examples

  # array form
  feemcube(
    array(1:24, c(4, 3, 2)), # 3-way array obtained elsewhere
    seq(340, 400, len = 4), seq(250, 300, len = 3) # wavelengths
  )
  # list form
  feemcube(
    replicate(2, feem( # list of feem objects
      matrix(1:6, 2), c(340, 400), c(250, 275, 300)
    ), FALSE),
    TRUE
  )
  str(as.list(feemcube(array(1:60, 3:5), 1:3, 1:4)))

[Package albatross version 0.3-7 Index]