A method to extract a random sample of spectra from a collection of spectra or a spectrum object containing multiple spectra in long form.
sample_spct(x, size = 1)sample_mspct(x, size = 1, recursive = FALSE)
If x is an object, such as a
  "filter_spct" object, the returned object is of same class but possibly
  containing fewer spectra in long form than x.
generic_spct An object possibly containing multiple spectra.
integer The number of spectra to extract, if available.
logical Sample members of x directly, or first split members containing multiple spectra.
See sample for the method used for
  the sampling.