labels: Get and Set Labels of a hyperSpec Object 'value' may be a...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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.

Usage

1
2
3
4
5
labels (object, which = NULL, ...) <- value

## S4 method for signature 'hyperSpec'
labels(object, which = bquote(), drop = TRUE, ...,
  use.colnames = TRUE)

Arguments

object

a hyperSpec object

which

numeric or character to specify the label(s)

...

ignored

value

the new label(s)

drop

if the result would be a list with only one element, should the element be returned instead?

use.colnames

should missing labels be replaced by column names of the extra data?

Details

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

Value

labels<- returns a hyperSpec object.

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

Author(s)

C. Beleites

See Also

labels

Examples

1
2
labels (flu, "c") <- expression ("/" ("c", "mg / l"))
labels (chondro)

Example output

Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.99-20180627

To get started, try
   vignette ("hyperspec")
   package?hyperSpec 
   vignette (package = "hyperSpec")

If you use this package please cite it appropriately.
   citation("hyperSpec")
will give you the correct reference.

The project homepage is http://hyperspec.r-forge.r-project.org


$y
expression("y")

$x
expression("x")

$filename
expression("filename")

$clusters
expression("clusters")

$spc
expression("I / a.u.")

$.wavelength
expression(Delta * tilde(nu)/cm^-1)

hyperSpec documentation built on May 2, 2019, 5:45 p.m.