Learn R Programming

albatross (version 0.3-8)

as.data.frame.feem: 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 feem
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
  # S3 method for feemcube
as.data.frame(x, ...)

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.

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.

See Also

feem.data.frame

Examples

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

Run the code above in your browser using DataLab