| as.data.frame {colorSpec} | R Documentation |
Convert a colorSpec Object to a data.frame
Description
convert a colorSpec object to a data.frame
Usage
## S3 method for class 'colorSpec'
as.data.frame( x, row.names=NULL, optional=FALSE, organization='auto', ... )
Arguments
x |
a colorSpec object |
organization |
The organization of the returned |
row.names |
ignored |
optional |
ignored |
... |
extra arguments ignored |
Details
If organization is 'auto',
and the organization of x is 'df.row',
then organization is set to 'row'
and the returned data.frame has the spectra in the rows.
Otherwise the returned data.frame has the spectra in the columns.
Value
If the returned data.frame has the spectra in the rows,
then the spectra are in a matrix in the last column (with name spectra),
and any existing extradata are also returned in the other columns.
The wavelengths are only present in character form,
as the colnames of the matrix.
If the returned data.frame has the spectra in the columns,
then the wavelengths are in the first column, and the spectra are in the other columns.