msmsply: Multi-spct transform methods

Description Usage Arguments Value

View source: R/mspct.methods.R

Description

Apply a function or operator to a collection of spectra.

Usage

1
2
3
4
5
6
7
8
msmsply(mspct, .fun, ..., .parallel = FALSE, .paropts = NULL)

msdply(mspct, .fun, ..., idx = NULL, col.names = NULL, .parallel = FALSE,
  .paropts = NULL)

mslply(mspct, .fun, ..., .parallel = FALSE, .paropts = NULL)

msaply(mspct, .fun, ..., .drop = TRUE, .parallel = FALSE, .paropts = NULL)

Arguments

mspct

an object of class generic_mspct or a derived class

.fun

a function

...

other arguments passed to .fun

.parallel

if TRUE, apply function in parallel, using parallel backend provided by foreach

.paropts

a list of additional options passed into the foreach function when parallel computation is enabled. This is important if (for example) your code relies on external data or packages: use the .export and .packages arguments to supply them so that all cluster nodes have the correct environment set up for computing.

idx

logical whether to add a column with the names of the elements of mspct, if NULL, the default, a column is added only if all members of mspct are named.

col.names

character Names to be used for data columns.

.drop

should extra dimensions of length 1 in the output be dropped, simplifying the output. Defaults to TRUE

Value

a collection of spectra in the case of msmsply

a data frame in the case of msdply

a list in the case of mslply

an vector in the case of msaply


photobiology documentation built on July 10, 2018, 1:04 a.m.