| make_rel {OpenSpecy} | R Documentation |
Make spectral intensities relative
Description
make_rel() converts intensities x into relative values between
0 and 1 using the standard normalization equation.
If na.rm is TRUE, missing values are removed before the
computation proceeds.
Usage
make_rel(x, ...)
## Default S3 method:
make_rel(x, na.rm = FALSE, ...)
## S3 method for class 'OpenSpecy'
make_rel(x, na.rm = FALSE, ...)
Arguments
x |
a numeric vector or an R OpenSpecy object |
na.rm |
logical. Should missing values be removed? |
... |
further arguments passed to |
Details
make_rel() is used to retain the relative height proportions between
spectra while avoiding the large numbers that can result from some spectral
instruments.
Value
make_rel() return numeric vectors (if vector provided) or an
OpenSpecy object with the normalized intensity data.
Author(s)
Win Cowger, Zacharias Steinmetz
See Also
min() and round();
adj_intens() for log transformation functions;
conform_spec() for conforming wavenumbers of an
OpenSpecy object to be matched with a reference library
Examples
make_rel(c(-1000, -1, 0, 1, 10))