as.data.frame.feem {albatross}R Documentation

Transform a FEEM object into a data.frame

Description

Transform a FEEM object from its matrix form accompanied by vectors of wavelengths into a three-column form consisting of (\lambda_\mathrm{em}, \lambda_\mathrm{ex}, I) tuples, which could be useful for export or plotting with lattice or ggplot2.

Usage

  ## S3 method for class 'feem'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
  ## S3 method for class 'feemcube'
as.data.frame(x, ...)

Arguments

x

A FEEM object, or a FEEM cube object.

row.names

Passed to data.frame. If default of NULL is used, data.frame will generate sequential integer row.names.

optional

This option is required for compatibility with as.data.frame generic, but is ignored, since the column names are already syntactic and the row names are generated by data.frame automatically by default.

...

Passed as-is to data.frame.

Details

Rows where intensity is NA are omitted from the output.

Value

A data.frame containing three numeric columns:

emission

Emission wavelength, nm.

excitation

Excitation wavelength, nm.

intensity

Fluorescence intensity at (\lambda_\mathrm{em}, \lambda_\mathrm{ex})

sample

For FEEM cube objects, the unique name of the sample possessing this tuple of values, a factor. If the original object didn't have any names, sequential integers are used instead. If the original object had non-unique names, sequence numbers are appended to them using make.unique.

See Also

feem.data.frame

Examples

  z <- feem(matrix(1:42, nrow = 7), 1:7, 1:6)
  head(as.data.frame(z))

[Package albatross version 0.3-7 Index]