Learn R Programming

visa (version 1.0.0)

spectra: Access the spectra data of 'SpectraLibrary'.

Description

Functions to access slot data of the Class Spectra.

Usage

spectra(object, ...)

# S4 method for Spectra spectra(object, ...)

# S4 method for data.frame spectra(object, ...)

# S4 method for matrix spectra(object, ...)

Arguments

object

A Spectra object, spectra.data.frame, or spectra.matrix.

...

Other options.

Details

Construct generic functions for the Spectra object, spectra.data.frame, and spectra.matrix.

Examples

Run this code
# For the S4 class 'Spectra'
library(visa)
data(NSpec.Lib)
spectra_matrix <- spectra(NSpec.Lib)
# For the spectra data.frame
data(NSpec.DF)
spectra_matrix <- spectra(NSpec.DF)

Run the code above in your browser using DataLab