Learn R Programming

photobiology (version 0.11.3)

fscale_spct: fscale a spectrum

Description

This function returns a spectral object of the same class as the one supplied as argument but with the spectral data re-scaled.

Usage

fscale_spct(spct, range, col.names, f, target, set.scaled, na.rm = FALSE, ...)

Value

a new object of the same class as spct.

Arguments

spct

generic_spct The spectrum to be normalized

range

an R object on which range() returns a vector of length 2, with min and max wavelengths (nm)

col.names

character The name of the variable to fscale

f

function A summary function to be applied to spct or the name of such a function as a character string.

set.scaled

logical Flag indicating if the data is to be marked as "scaled" or not.

na.rm

logical Indicating whether NA values should be stripped before the computation proceeds

...

other arguments passed to f() by name.