R/hyperSpec_conversion.R

Defines functions as.hyperSpec

Documented in as.hyperSpec

as.hyperSpec <- function(object)
{
  if (!requireNamespace("hyperSpec", quietly = TRUE))
    stop("Library 'hyperSpec' is required to convert object to hyperSpec-class")

  spc <- new("hyperSpec", spc = spectra(object), wavelength = wavelength(object), data = SI(object))
  
  return(spc)
}

Try the hsdar package in your browser

Any scripts or data that you put into this service are public.

hsdar documentation built on Nov. 17, 2017, 4:35 a.m.