If organization(x)
is "vector"
, then x
is a vector
representing a single spectrum. Compare this with stats::ts()
.
If organization(x)
is "matrix"
, then x
is a matrix
and the spectra are stored in the columns.
If organization(x)
is "df.col"
, then x
is a data.frame
with M+1 columns, where M is the number of spectra.
The wavelengths are stored in column 1, and the spectra in columns 2:(M+1).
This organization is good for printing to the console, and writing to files.
If the organization
of x
is "df.row"
, then x
is a data.frame
with N rows, where N is the number of spectra.
The spectra are stored in the last column, which is a matrix with the name "spectra"
.
The other columns preceding spectra
(if present) contain extra data associated with
the spectra; see extradata
.