Central wavelength value

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
midpoint(x, ...)

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

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

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

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

## S3 method for class 'generic_mspct'
midpoint(x, ..., idx = !is.null(names(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)

See Also

Other wavelength summaries: min, range, stepsize

Other wavelength summaries: min, range, stepsize

Other wavelength summaries: min, range, stepsize

Examples

1

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.