dimnames {hyperSpec}R Documentation

Dimnames of an hyperSpec Object

Description

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).

Usage

## 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)

Arguments

x a hyperSpec object
do.NULL, prefix handed to rownames and colnames, respectively.

Details

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.

Value

rownames and colnames return an character vector,
dimames returns a list with elements row, data, wl with the respective character vectors.

Author(s)

C. Beleites

See Also

rownames, colnames, and dimnames

rownames<- and colnames<- for the replacement functions

wl, wl<- for accessing the values of the wavelength axis.

Examples

rownames (flu)
colnames (flu)
dimnames (laser)

rownames (flu) <- paste ("sample", LETTERS [1 : 6])
flu$..

[Package hyperSpec version 0.95 Index]