View source: R/ir_sample_prospectr.R
ir_sample_prospectr | R Documentation |
Wrapper functions that allows to directly use 'ir' objects with sampling functions from the 'prospectr' package.
ir_sample_prospectr(x, sampling_function, ..., return_prospectr_output = FALSE)
x |
An object of class 'ir' containing the spectra based on which to sample measurements. |
sampling_function |
A function from the 'prospectr' package to perform
sampling based on spectra ( |
... |
Arguments passed to |
return_prospectr_output |
Logical value. If |
If return_prospectr_output = TRUE
, the output of sampling_function
. See
the 'prospectr' package for details. If return_prospectr_output = FALSE
,x
with the following additional columns:
Logical value indicating whether the spectrum is
listed in element model
of the prospectr output (TRUE
) or not
(FALSE
).
Logical value indicating whether the spectrum is
listed in element test
of the prospectr output (TRUE
) or not
(FALSE
).
Integer representing the order in which spectra are
listed in element model
of the prospectr output.
Integer representing the order in which spectra are
listed in element test
of the prospectr output.
if(requireNamespace("prospectr", quietly = TRUE)) {
x <-
ir_sample_prospectr(
ir::ir_sample_data,
prospectr::kenStone,
metric = "euclid",
k = 30,
return_prospectr_output = FALSE
)
x <-
ir_sample_prospectr(
ir::ir_sample_data,
prospectr::kenStone,
metric = "euclid",
k = 30,
return_prospectr_output = TRUE
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.