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

expanse

Expanse


Description

A function that returns the expanse (max(x) - min(x)) for R objects.

Usage

spread(x, ...)

wl_expanse(x, ...)

expanse(x, ...)

## Default S3 method:
expanse(x, ...)

## S3 method for class 'numeric'
expanse(x, ...)

## S3 method for class 'waveband'
expanse(x, ...)

## S3 method for class 'generic_spct'
expanse(x, ...)

## S3 method for class 'generic_mspct'
expanse(x, ..., idx = "spct.idx")

Arguments

x

an R object

...

not used in current version

idx

character Name of the column with the names of the members of the collection of spectra.

Value

A numeric value equal to max(x) - min(x). In the case of spectral objects wavelength difference in nm. For any other R object, according to available definitions of min and max.

Methods (by class)

  • default: Default method for generic function

  • numeric: Method for "numeric"

  • waveband: Method for "waveband"

  • generic_spct: Method for "generic_spct"

  • generic_mspct: Method for "generic_mspct" objects.

Examples

expanse(10:20)
expanse(sun.spct)
wl_expanse(sun.spct)

expanse(sun.spct)

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.