Select a set of calibration spectra to develop spectral models. Samples in this list will be analyzed using laboratory reference methods.

select_ref_spc(spc_tbl, ratio_ref, pc, print = TRUE)

Arguments

spc_tbl

Spectra as tibble objects that contain preprocessed spectra

ratio_ref

Ratio of desired reference samples to total sample number

pc

Number of principal components (numeric). If pc < 1, the number of principal components kept corresponds to the number of components explaining at least (pc * 100) percent of the total variance.

print

logical expression whether a plot (ggplot2) of sample selection for reference analysis is shown in PCA space (TRUE or FALSE).