Description Usage Arguments Details Value Author(s) See Also Examples
collapse/bind several hyperSpec objects into one object
1 | collapse(..., wl.tolerance = hy.getOption("wl.tolerance"))
|
... |
hyperSpec objects to be collapsed into one object. Instead of giving several arguments, a list with all objects to be collapsed may be given. |
wl.tolerance |
tolerance to decide which wavelengths are considered equal. |
The spectra from all objects will be put into one object.
The resulting object has all wavelengths that occur in any of the input objects,
wl.tolerance
is used to determine which difference in the wavelengths is
tolerated as equal. The returned object has wavelengths rounded according to the
precision indicated by wl.tolerance
.
Data points corresponding to wavelengths not in the original spectrum will be set to NA. Extra data is combined in the same manner.
If the objects are named, the names will be preserved in extra data column $.name
.
a hyperSpec object
C. Beleites
merge
to merge hyperSpec objects that share wavelengths but contain
different spectra, rbind
, and rbind.fill
for
1 2 3 4 5 6 7 8 9 10 11 12 | barbiturates [1:3]
barb <- collapse (barbiturates [1:3])
barb
a <- barbiturates [[1]]
b <- barbiturates [[2]]
c <- barbiturates [[3]]
a
b
c
collapse (a, b, c)
|
Loading required package: lattice
Loading required package: grid
Loading required package: ggplot2
Package hyperSpec, version 0.98-20161118
To get started, try
vignette ("introduction", package = "hyperSpec")
package?hyperSpec
vignette (package = "hyperSpec")
If you use this package please cite it appropriately.
citation("hyperSpec")
will give you the correct reference.
The project homepage is http://hyperspec.r-forge.r-project.org
[[1]]
hyperSpec object
1 spectra
3 data columns
37 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 160.90 158.85 ... 27.05
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.027184
2. z.end: t/min [numeric] 4.027184
3. spc: I/"a. u." [matrix37] 902 896 ... 562
[[2]]
hyperSpec object
1 spectra
3 data columns
34 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 158.85 140.90 ... 27.15
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.034117
2. z.end: t/min [numeric] 4.034117
3. spc: I/"a. u." [matrix34] 857 864 ... 618
[[3]]
hyperSpec object
1 spectra
3 data columns
29 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 158.85 132.95 ... 27.05
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.04095
2. z.end: t/min [numeric] 4.04095
3. spc: I/"a. u." [matrix29] 735 1412 ... 638
hyperSpec object
3 spectra
3 data columns
57 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 160.90 158.85 ... 43.95
data: (3 rows x 3 columns)
1. z: t/min [numeric] 4.027184 4.034117 4.040950
2. z.end: t/min [numeric] 4.027184 4.034117 4.040950
3. spc: I/"a. u." [matrix57] 902 NA ... 1238 + NA
hyperSpec object
1 spectra
3 data columns
37 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 160.90 158.85 ... 27.05
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.027184
2. z.end: t/min [numeric] 4.027184
3. spc: I/"a. u." [matrix37] 902 896 ... 562
hyperSpec object
1 spectra
3 data columns
34 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 158.85 140.90 ... 27.15
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.034117
2. z.end: t/min [numeric] 4.034117
3. spc: I/"a. u." [matrix34] 857 864 ... 618
hyperSpec object
1 spectra
3 data columns
29 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 158.85 132.95 ... 27.05
data: (1 rows x 3 columns)
1. z: t/min [numeric] 4.04095
2. z.end: t/min [numeric] 4.04095
3. spc: I/"a. u." [matrix29] 735 1412 ... 638
hyperSpec object
3 spectra
3 data columns
57 data points / spectrum
wavelength: frac(m, z)/frac(u, e) [numeric] 160.90 158.85 ... 43.95
data: (3 rows x 3 columns)
1. z: t/min [numeric] 4.027184 4.034117 4.040950
2. z.end: t/min [numeric] 4.027184 4.034117 4.040950
3. spc: I/"a. u." [matrix57] 902 NA ... 1238 + NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.