"applyspec"( x, FUN, ... )
FUN
wavelength
, quantity
, and organization
.
If FUN
does not return an N-vector, it is an ERROR and
applyspec
returns NULL
.
applyspec
simply calls apply
with the right MARGIN
.
quantity
,
wavelength
,
linearize
,
organization
# convert absorbance to transmittance
path = system.file( "extdata/stains/Hematoxylin.txt", package='colorSpec' )
x = readSpectra( path )
x = applyspec( x, function(y) {10^(-y)} ) # this is what linearize(x) does
Run the code above in your browser using DataLab