simSpectra.RdSimulation 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).
Values for x axis ("wavelengths").
Number of groups.
Number of samples in a group (vector of values for each group).
Total number of samples.
Number of spectral components (dimensions).
A vector of possible values of Gaussian curve parameter "w' (i.e., width). Values of w will be randomly sampled from this vector.
Logical. If TRUE - makes plots. Default is FALSE.
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.
[This function works, but is not well documented yet.]
simSpectra()
#> $Spectra
#> hyperSpec object
#> 150 spectra
#> 3 data columns
#> 501 data points / spectrum
#>
#> $Loadings
#> hyperSpec object
#> 4 spectra
#> 4 data columns
#> 501 data points / spectrum
#>
#> $Scores
#> hyperSpec object
#> 150 spectra
#> 3 data columns
#> 4 data points / spectrum
#>
simSpectra()$Spectra
#> hyperSpec object
#> 150 spectra
#> 3 data columns
#> 501 data points / spectrum