Spectra-class {visa}R Documentation

Create a Spectra or SpectraDatabase

Description

Constructor as.spectra creates a Spectra object.

Constructor as.spectra.database creates a SpectraDatabase object.

Usage

as.spectra(
  spectra = matrix(0),
  wavelength = numeric(0),
  w.unit = "nm",
  data = data.frame(),
  ...
)

as.spectra.database(
  spectra = matrix(0),
  wavelength = numeric(0),
  w.unit = "nm",
  data = data.frame(),
  ...
)

Arguments

spectra

A matrix

wavelength

A numeric vector

w.unit

A character string

data

A data.frame

...

Other parameters

Slots

spectra

A matrix

wavelength

A numeric vector

w.unit

A character string

data

A data.frame

Examples

s <- as.spectra(matrix(1:100, 4), 1:25, "nm", data.frame(x = letters[1:4]))
str(s)

s <- as.spectra.database(matrix(1:100, 4), 1:25, "nm", data.frame(x = letters[1:4]))
str(s)

[Package visa version 0.1.0 Index]