simSpectra | R Documentation |
Simulation of spectroscopic data: Loadings (spectra of spectroscopic components), Scores (amplitudes of these components) an Spectra (mixture of the spectroscopic components multiplied by the amplitudes with random noise added).
simSpectra(
x = 300:800,
nGr = 2,
nInGr = c(50, 50, 50),
N = sum(nInGr),
nDim = 4,
w.possile = 5:150,
plots = FALSE
)
x |
Values for x axis ("wavelengths"). |
nGr |
Number of groups. |
nInGr |
Number of samples in a group (vector of values for each group). |
N |
Total number of samples. |
nDim |
Number of spectral components (dimensions). |
w.possile |
A vector of possible values of Gaussian curve parameter "w' (i.e., width). Values of w will be randomly sampled from this vector. |
plots |
Logical. If |
[This function works, but is not well documented yet.]
List of hyperSpec
objects:
Spectra of each observation, made of (Scores * Loadings) + NOISE
.
Normalized spectra of components.
Amplitudes of components for each observation.
In the list the hyperSpec
objects contain spectroscopic data and
additional variables.
Additional variables for Spectra
and Scores
:
A factor variable for classification.
A factor variable for other type classification.
Additional variables for Loadings
:
Position of components top peak.
Names of components.
Original order of components before sorting.
Vilmantas Gegzna
simSpectra()
simSpectra()$Spectra
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.