join_mspct {photobiology} | R Documentation |
Join all spectra in a collection
Description
Join all the spectra contained in a homogeneous collection, returning a data
frame with spectral-data columns named according to the names of the spectra
in the collection. By default a full join is done within the overlapping range
of wavelengths, after interpolating the spectra to a shared set of wavelength
values, and discarding data for wavelength not shared. Alternatively, filling
the spectral data for wavelengths outside the overlapping range with with
NA
when data is not available.
Usage
join_mspct(x, type, ...)
## Default S3 method:
join_mspct(x, type = "full", ...)
## S3 method for class 'generic_mspct'
join_mspct(x, type = "full", col.name, validate.names = TRUE, ...)
## S3 method for class 'source_mspct'
join_mspct(x, type = "full", unit.out = "energy", validate.names = TRUE, ...)
## S3 method for class 'response_mspct'
join_mspct(x, type = "full", unit.out = "energy", validate.names = TRUE, ...)
## S3 method for class 'filter_mspct'
join_mspct(
x,
type = "full",
qty.out = "transmittance",
validate.names = TRUE,
...
)
## S3 method for class 'reflector_mspct'
join_mspct(x, type = "full", validate.names = TRUE, ...)
## S3 method for class 'object_mspct'
join_mspct(x, type = "full", qty.out, validate.names = TRUE, ...)
## S3 method for class 'solute_mspct'
join_mspct(x, type = "full", validate.names = TRUE, ...)
Arguments
x |
generic_mspct object, or an object of a class derived from
|
type |
character Type of join: |
... |
ignored (possibly used by derived methods). |
col.name |
character, name of the column in the spectra to be preserved, in addition to "w.length". |
validate.names |
logical A flag to enable (default) or disable
validation of column names with |
unit.out |
character Allowed values |
qty.out |
character Allowed values |
Value
A data.frame
with the spectra joined by, possibly
interpolated, wavelength, with rows sorted by wavelength (variable
w.length
) and data columns named according to the names of members
in x
, by default made unique and valid.
Methods (by class)
-
join_mspct(default)
: -
join_mspct(generic_mspct)
: -
join_mspct(source_mspct)
: -
join_mspct(response_mspct)
: -
join_mspct(filter_mspct)
: -
join_mspct(reflector_mspct)
: -
join_mspct(object_mspct)
: -
join_mspct(solute_mspct)
:
Note
Currently only generic_spct
, source_mspct
,
response_mspct
, filter_mspct
, reflector_mspct
,
object_mspct
and solute_mspct
classes have this method
implemented.
Examples
my.mspct <- solute_mspct(list(water = water.spct, pha = phenylalanine.spct))
join_mspct(my.mspct, type = "inner")
join_mspct(my.mspct, type = "full")