Learn R Programming

photobiology (version 0.9.6)

fshift: Shift the scale of a spectrum using a summary function

Description

These functions return a spectral object of the same class as the one supplied as argument but with the spectral data on a shift scale.

Usage

fshift(x, ...)

## S3 method for class 'source_spct':
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
  unit.out = getOption("photobiology.radiation.unit", default = "energy"),
  ...)

## S3 method for class 'response_spct':
fshift(x, range = c(min(x), min(x) + 10),
  f = "mean", unit.out = getOption("photobiology.radiation.unit", default =
  "energy"), ...)

## S3 method for class 'filter_spct':
fshift(x, range = c(min(x), min(x) + 10), f = "min",
  qty.out = getOption("photobiology.filter.qty", default = "transmittance"),
  ...)

## S3 method for class 'reflector_spct':
fshift(x, range = c(min(x), min(x) + 10),
  f = "min", qty.out = NULL, ...)

## S3 method for class 'source_mspct':
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
  unit.out = getOption("photobiology.radiation.unit", default = "energy"),
  ...)

## S3 method for class 'raw_spct':
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
  qty.out = NULL, ...)

## S3 method for class 'cps_spct':
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
  qty.out = NULL, ...)

## S3 method for class 'generic_spct':
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
  col.names, ...)

## S3 method for class 'response_mspct':
fshift(x, range = c(min(x), min(x) + 10),
  f = "mean", unit.out = getOption("photobiology.radiation.unit", default =
  "energy"), ...)

## S3 method for class 'filter_mspct':
fshift(x, range = c(min(x), min(x) + 10), f = "min",
  qty.out = getOption("photobiology.filter.qty", default = "transmittance"),
  ...)

## S3 method for class 'reflector_mspct':
fshift(x, range = c(min(x), min(x) + 10),
  f = "min", qty.out = NULL, ...)

## S3 method for class 'raw_mspct':
fshift(x, range = c(min(x), min(x) + 10), f = "min",
  ...)

## S3 method for class 'cps_mspct':
fshift(x, range = c(min(x), min(x) + 10), f = "min",
  ...)

## S3 method for class 'generic_mspct':
fshift(x, range = c(min(x), min(x) + 10), f = "min",
  col.names, ...)

Arguments

x
An R object
...
additonal named arguments passed down to f.
range
An R object on which range() returns a numeric vector of length 2 with the limits of a range of wavelengths in nm, with min annd max wavelengths (nm)
f
character string "mean", "min" or "max" for scaling so that this summary value becomes the origin of the spectral data scale in the returned object, or the name of a function taking x as first argument and returning a numeric value.
unit.out
character Allowed values "energy", and "photon", or its alias "quantum"
qty.out
character Allowed values "transmittance", and "absorbance"
col.names
character vector containing the names of columns or variables to which to apply the scale shift.

Methods (by class)

  • source_spct:
  • response_spct:
  • filter_spct:
  • reflector_spct:
  • source_mspct:
  • raw_spct:
  • cps_spct:
  • generic_spct:
  • response_mspct:
  • filter_mspct:
  • reflector_mspct:
  • raw_mspct:
  • cps_mspct:
  • generic_mspct:

See Also

Other rescaling functions: fscale, getNormalized, is_normalized, is_scaled, normalize, setNormalized, setScaled