Learn R Programming

hyperSpec (version 0.95)

labels: Get and Set Labels of a hyperSpec Object

Description

labels

Usage

## S3 method for class 'hyperSpec':
labels(object, which = NULL, drop = TRUE, \dots)
labels (object, which = NULL, ...) <- value

Arguments

object
a hyperSpec object
which
numeric or character to specify the label(s)
drop
if the result would be a list with only one element, should the element be returned instead?
...
handed to logentry
value
the new label(s)

Value

  • labels returns a list of labels. If drop is TRUE and the list contains only one element, the element is returned instead.

    labels<- returns a hyperSpec object.

Details

value may be a list or vector of labels giving the new label for each of the entries specified by which.

The names of the labels are the same as the colnames of the data.frame. The label for the wavelength axis has the name .wavelength.

The labels should be given in a form ready for the text-drawing functions (see plotmath), e.g. as expression or a character.

See Also

labels

Examples

Run this code
labels (chondro)
labels (flu, "c") <- expression ("/" ("c", "mg / l"))

Run the code above in your browser using DataLab