Learn R Programming

photobiology (version 0.9.5)

midpoint.generic_mspct: Central wavelength value

Description

A function that returns the wavelength at the center of the wavelength range.

Usage

## S3 method for class 'generic_mspct':
midpoint(x, ..., idx = !is.null(names(x)))

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

midpoint(x, ...)

## S3 method for class 'default':
midpoint(x, ...)

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

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

Arguments

x
an R object
...
not used in current version
idx
logical whether to add a column with the names of the elements of spct

Value

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

Methods (by class)

  • generic_mspct: Method for "generic_mspct" objects.
  • generic_spct: Method for "generic_spct" objects.
  • default: Default method for generic function
  • numeric: Default method for generic function
  • waveband: Wavelength at center of a "waveband" object.

See Also

Other wavelength summaries: max.generic_mspct, min.generic_mspct, min.waveband, range.generic_mspct, range.waveband, stepsize.generic_mspct Other wavelength summaries: max.generic_mspct, min.generic_mspct, min.waveband, range.generic_mspct, range.waveband, stepsize.generic_mspct Other wavelength summaries: max.generic_mspct, min.generic_mspct, min.waveband, range.generic_mspct, range.waveband, stepsize.generic_mspct

Examples

Run this code
midpoint(sun.spct)

Run the code above in your browser using DataLab