Skip to contents

Return a copy of an R object with its class set to a given type of spectrum.

Usage

as.source_spct(x, ...)

# Default S3 method
as.source_spct(
  x,
  time.unit = c("second", "day", "exposure"),
  bswf.used = c("none", "unknown"),
  ...
)

Arguments

x

an R object.

...

Arguments passed on to setSourceSpct

multiple.wl

numeric Maximum number of repeated w.length entries with same value.

idfactor

character Name of factor distinguishing multiple spectra when stored longitudinally (required if mulitple.wl > 1).

strict.range

logical Flag indicating whether off-range values result in an error instead of a warning.

time.unit

character string indicating the time unit used for spectral irradiance or exposure ("second", "day" or "exposure") or an object of class duration as defined in package lubridate.

bswf.used

character A string, either "none" or the name of a BSWF. (Users seldom need to change the default, as this metadata value is in normal use set by operators or functions that apply a BSWF.)

Value

A copy of x converted into a source_spct object.