Read an .Rda file as saved during data acquisition and plot it, possibly first trimming the range of wavelengths and/or smoothing the spectral data.
Arguments
- file
a (readable binary-mode) connection or a character string giving the name of the file to load (when tilde expansion is done).
- range
a numeric vector of length two, or any other object for which function range() will return two.
- method
a character string "custom", "lowess", "supsmu".
- strength
numeric value to adjust the degree of smoothing.
- na.rm
a logical value indicating whether NA values should be stripped before the computation proceeds.
Note
If the argument passed to method
is of length 2, the first
member will apply to source_spct
objects and the second one to
filter_spct
and reflector_spct
objects. A numeric vector
of length 2 passed to strength
is treated in the same way. This
is only relevant when we are collecting spectra belonging to different
classes and need to treat them differently with respect to smoohting. It
also allows different defaults, as transmittance spectra tend to lack
the fine structure of some emission spectra.
See also
Function trim_wl
is used to trim the
range of the data to plot, and function
smooth_spct
is used for smoothing, and
prameters range
, and strength
and method
are passed to
them, respectively.
Other functions for importing spectral data from files:
collect_spct_files()
,
map_oofile_header_rows()
,
oofile_data_rows()
,
read_files2mspct()
,
read_oo_data()
,
read_oo_ovdata()
,
read_oo_pidata()
,
read_oo_ssdata()
,
set_oo_ssdata_descriptor()
,
set_oo_ssdata_settings()