data(feems)
cube <- feemscale(feemscatter(cube, c(24, 14)), na.rm = TRUE)
factors <- feemparafac(cube, nfac = 3, ctol = 1e-4)
# all defaults
write.openfluor(factors, f1 <- tempfile(fileext = '.txt'))
if (interactive()) file.show(f1)
unlink(f1)
# all non-default arguments
write.openfluor(
factors, f2 <- tempfile(fileext = '.txt'), name = 'example',
creator = 'J. Doe', doi = '10.1000/1', reference = paste(
'Upper D, (1973),', "'The unsuccessful self-treatment of a case",
"of \"writer's block\"',", 'J Appl Behav Anal, 7(3), 497'
), unit = 'AU', toolbox = 'all calculations done by hand',
date = '2038-01-19', fluorometer = 'Acme Fluor-o-matic 9000',
constraints = 'non-negative', validation = 'prior knowledge',
methods = 'Instrument spectral bias correction: Ex & Em',
preprocess = 'Scatter region excised (replaced with NaNs)',
sources = 'freshwater', ecozones = 'Balkash',
description = 'not a real model', shift = FALSE, scale = TRUE
)
if (interactive()) file.show(f2)
unlink(f2)
Run the code above in your browser using DataLab