eem_interp: Missing values are interpolated within EEM data

Description Usage Arguments Details Value References See Also Examples

Description

Missing EEM data can be interpolated. Usually it is the result of removing scatter or other parts where noise is presumed. Different interpolation algorithms can be used (see details).

Usage

1
2
eem_interp(data, cores = parallel::detectCores(logical = FALSE),
  type = TRUE, verbose = FALSE, nonneg = TRUE, ...)

Arguments

data

object of class eemlist with spectra containing missing values

cores

specify number of cores for parallel computation

type

numeric 0 to 4 or TRUE which resembles type 1

verbose

logical, whether more information on calculation should be provided

nonneg

logical, whether negative values should be replaced by 0

...

arguments passed on to other functions (pchip, na.approx, mba.points)

Details

The types of interpolation are (0) setting all NAs to 0, (1) spline interpolation with mba.points, (2) excitation and emission wavelength-wise interpolation with pchip and subsequent mean, (3) excitation wavelength-wise interpolation with pchip and (4) linear interpolation in 2 dimensions with na.approx and again subsequent mean calculation. Calculating the mean is a way of ensuring NAs are also interpolated where missing boundary values would make that impossible. Using type = 3, extrapolation can be suppressed by adding the argument extend = FALSE.

Value

object of class eemlist with interpoleted spectra.

References

Elcoroaristizabal, S., Bro, R., GarcĂ­a, J., Alonso, L. 2015. PARAFAC models of fluorescence data with scattering: A comparative study. Chemometrics and Intelligent Laboratory Systems, 142, 124-130 https://doi.org/10.1016/j.chemolab.2015.01.017

See Also

pchip, mba.points, na.approx

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data(eem_list)
eem_list <- eem_list[1:6]
class(eem_list) <- "eemlist"

remove_scatter <- c(TRUE, TRUE, TRUE, TRUE)

remove_scatter_width = c(15,10,16,12)

eem_list <- eem_rem_scat(eem_list,remove_scatter,remove_scatter_width)

eem_list <- eem_interp(eem_list)

ggeem(eem_list)

eem_list2 <- eem_setNA(eem_list,ex=200:280,interpolate=FALSE)

ggeem(eem_list2)

eem_list3 <- eem_interp(eem_list2,type=1,extend = TRUE)

ggeem(eem_list3)

eem_list3 <- eem_interp(eem_list2,type=1,extend = FALSE)

ggeem(eem_list3)

jakehosen/stardom_aqualog documentation built on May 14, 2019, 3:06 a.m.