convert a colorSpec object to a data.frame
# S3 method for colorSpec
as.data.frame( x, row.names=NULL, optional=FALSE, organization='auto', ... )
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.
a colorSpec object
The organization of the returned data.frame
,
which can be 'row'
, 'col'
, or 'auto'
.
If 'auto'
, then 'row'
or 'col'
is selected automatically,
see Details
ignored
ignored
extra arguments ignored
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.
as.matrix
,
extradata