Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.object_mspct

Coerce to a collection-of-spectra


Description

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

Usage

as.object_mspct(x, ...)

## Default S3 method:
as.object_mspct(x, ...)

## S3 method for class 'data.frame'
as.object_mspct(
  x,
  Tfr.type = c("total", "internal"),
  Rfr.type = c("total", "specular"),
  strict.range = TRUE,
  ...
)

## S3 method for class 'object_spct'
as.object_mspct(x, ...)

## S3 method for class 'list'
as.object_mspct(
  x,
  Tfr.type = c("total", "internal"),
  Rfr.type = c("total", "specular"),
  strict.range = TRUE,
  ...,
  ncol = 1,
  byrow = FALSE
)

Arguments

x

a list of spectral objects or a list of objects such as data frames that can be converted into spectral objects.

...

passed to individual spectrum object constructor

Tfr.type

a character string, either "total" or "internal"

Rfr.type

a character string, either "total" or "specular"

strict.range

logical Flag indicating how off-range values are handled

ncol

integer Number of 'virtual' columns in data

byrow

logical If ncol > 1 how to read in the data

Value

A copy of x converted into a object_mspct object.

Methods (by class)

  • default:

  • data.frame:

  • object_spct:

  • list:

See Also


photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.