Description Usage Arguments Details Value Examples
Given a log file with columns sample identification, path to reference and sample measurements [id, R, S] this function creates a logical vector [is.REF] with the hyperSpec
1 | assign.type(dn, logfile = "fieldlog.csv")
|
dn |
A hyperSpec object |
logfile |
Path to the corresponding logfile for the object |
The format of the logfile must be followed (.CSV). FIXME make more flexible
A hyperSpec object including with sample identification [id] and indication if a reference measurement [is.REF]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # set path to data files
file.path <- system.file("extdata", package = "FASTSpectra")
# parse spectra into hyperSpec object
dn <- read.txt.OceanOptics(files=paste0(file.path,"/*.txt"))
# assign measurement id and type using fieldlog file
logfile <- paste0(file.path,"/fieldlog.csv")
dn <- assign.type(dn, logfile=logfile)
# split into sample and reference
type <- slot(dn,"data")[["type"]]
dn <- split(x=dn, f=type)
summary(dn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.