dimnames {hyperSpec} | R Documentation |
rownames
yields the names of the rows (spectra) of a hyperSpec
object,
colnames
the names of the data colums, and
dimnames
both together with the names of the wavelengths (see
below).
## S4 method for signature 'hyperSpec': colnames(x, do.NULL = TRUE, prefix = "col") ## S4 method for signature 'hyperSpec': rownames(x, do.NULL = TRUE, prefix = "row") ## S4 method for signature 'hyperSpec': dimnames(x)
x |
a hyperSpec object |
do.NULL, prefix |
handed to rownames and
colnames , respectively. |
dimnames
returns in element wl
the colnames of the spectra
matrix, not the values.
The replacement functions for column and row names are used like:
colnames (x) <- value rownames (x) <- value
If changing the colnames, be careful not to touch spc
. Otherwise
an error about an invalid hyperSpec object results.
rownames
and colnames
return an character
vector,
dimames
returns a list with elements row
, data
, wl
with the
respective character vectors.
C. Beleites
rownames
, colnames
, and
dimnames
rownames<-
and colnames<-
for the
replacement functions
wl
, wl<-
for
accessing the values of the wavelength axis.
rownames (flu) colnames (flu) dimnames (laser) rownames (flu) <- paste ("sample", LETTERS [1 : 6]) flu$..