separate | R Documentation |
Spectra*
object into a calibration and a validation set.Separates a Spectra*
object into a calibration and a validation set.
## S4 method for signature 'Spectra'
separate(obj, calibration)
obj |
an object inheriting from class |
calibration |
The fraction of the dataset to be put in the calibration set |
An list with two SpectraDataFrame
objects, one for the
calibration, and the other for the validation.
Pierre Roudier pierre.roudier@gmail.com
# Loading example data
data(australia)
spectra(australia) <- sr_no ~ ... ~ 350:2500
l <- separate(australia, calibration=0.7)
# The result is a list of two Spectra* objects
str(l)
lapply(l, nrow)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.