Retrieve or set the extradata of a colorSpec object.
# S3 method for colorSpec
extradata(x)# S3 method for colorSpec
extradata(x,add=FALSE) <- value
extradata(x)
returns a data.frame
with M rows,
where M is the number of spectra in x
.
The rownames
are set to the specnames
of x
.
If there is no extra data then the number of columns in this data.frame
is 0.
a colorSpec object with M spectra
a data.frame
with M rows.
It is OK for value
to have 0 columns,
and value
can also be NULL
; see add
.
If add
is FALSE
,
then any existing extradata is discarded and replaced by value
,
except when value
is NULL
when x
is left with no extradata
.
If add
is TRUE
, then value
is appended to the existing extradata,
except when value
is NULL
when x
is left unchanged.
If the organization
of x
is not 'df.row'
,
then extradata
cannot be stored in x
and the assignment is ignored, with a warning.
First change the organization
to 'df.row'
,
and then assign the extradata
.
If the organization
of x
is 'df.row'
, but value
does not have
the right number of rows, the assignment is ignored, with a warning.
metadata
,
organization