Description Usage Arguments Value Examples
This function resamples the hyperspec object to an equal number of cells/spectra. Options are to resample with or withour replacement.
1 | hs_resample(hs.x, sample = 0, replace = FALSE, seed = NULL)
|
hs.x |
hyperSpec object. |
sample |
Desired sample size. Defaults to minimum sample size. |
replace |
Do you want to resample with or without replacement? Defaults to FALSE, which is without replacement. |
seed |
Set seed for reproducibile sampling if that is necessary. Defaults to NULL. |
Hyperspec object
1 2 3 4 5 6 7 8 | # Short example
data("hs_example")
# Preprocess
hs_example <- hs_preprocess(hs_example)
# Resample
hs_example_r <- hs_resample(hs_example, sample = 10, replace = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.