collapse: Collapse hyperSpec objects

Description Usage Arguments Details Value Author(s) See Also Examples

Description

collapse/bind several hyperSpec objects into one object

Usage

1
collapse(..., wl.tolerance = hy.getOption("wl.tolerance"))

Arguments

...

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.

Details

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.

Value

a hyperSpec object

Author(s)

C. Beleites

See Also

merge to merge hyperSpec objects that share wavelengths but contain different spectra, rbind, and rbind.fill for

Examples

 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)

GegznaV/hyperSpec2 documentation built on Dec. 27, 2019, 9:43 a.m.