spectra-methods: Access the spectra data of 'SpectraLibrary'.

spectraR Documentation

Access the spectra data of 'SpectraLibrary'.

Description

Functions to access slot data of the Class Spectra.

Usage

spectra(object, ...)

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

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

## S4 method for signature '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

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


kang-yu/visa documentation built on June 11, 2025, 1:36 a.m.