as.data.frame-methods {hyperSpec}R Documentation

Conversion of a hyperSpec object into a data.frame or matrix

Description

as.data.frame returns x@data as.long.df returns a long-format data.frame

as.matrix returns the spectra matrix x@data$spc

Usage

## S4 method for signature 'hyperSpec, missing, missing':
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
as.long.df (x, rownames = FALSE)
## S4 method for signature 'hyperSpec':
as.matrix(x, ...)

Arguments

x a hyperSpec object
row.names, optional, ... ignored
rownames should the rownames be in column .rownames of the long-format data.frame?

Details

Long-format data.frame: this is the stacked or molten version of x@data.

Value

x@data and x@data$spc, respectively.

Author(s)

C. Beleites

See Also

as.data.frame and as.matrix

[

stack and melt for other functions producing long-format data.frames.

Examples

as.data.frame (chondro [1:3,, 600:620])
as.matrix (chondro [1:3,, 600:620])

[Package hyperSpec version 0.95 Index]