View source: R/stats_function_overloads.R
| quantile.spectra | R Documentation | 
quantile computes quantiles by band and returns them as 'spectra'.
## S3 method for class 'spectra'
quantile(
  x,
  probs = c(0.025, 0.25, 0.5, 0.75, 0.975),
  na.rm = TRUE,
  names = NULL,
  ...
)
| x | spectra object. Must have at least the same number of sample that length(probs) has. | 
| probs | Probabilities to compute quantiles. Must be a vector of numerics between 0.0 and 1.0. Defaults to c(0.025, 0.25, 0.5, 0.75, 0.975). Duplicated probs will be removed. | 
| na.rm | remove NAs before computing quantiles? Defaults to TRUE | 
| names | names for each quantile spectrum. If NULL (default), names are set to 'probs'. A char vector should otherwise be given. Recycled. | 
| ... | other arguments passed to quantile. | 
spectra object with one spectrum for each prob
Jose Eduardo Meireles
library(spectrolab)
spec = as_spectra(spec_matrix_example, name_idx = 1)
quantile(spec, probs = c(0.25, 0.75))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.