get_quantiles {SeaVal}R Documentation

Calculate quantiles from a data table

Description

The quantiles are saved in/returned as a list with the following elements:

Usage

get_quantiles(
  dt,
  data_col = setdiff(names(dt), dimvars(dt))[1],
  qqs = c(10, 20, 33, 67, 80, 90),
  by = setdiff(dimvars(dt), c("year", "member")),
  description = NULL,
  save_file = NULL
)

Arguments

dt

Data table containing the data.

data_col

The name of the column in dt containing the data for which the quantiles are derived. By default the first column that is not a dimension variable is selected.

qqs

Vector of quantiles. If one of them is larger 1 they are interpreted as percent. Default is the quantiles used in the verification maps.

by

Column names in dt. Levels by which the quantiles are calculated

description

Optional description string.

save_file

Optional name of save file.

Value

Nothing if save_file is provided. Otherwise the list described above

Examples

get_quantiles(chirps_monthly)


[Package SeaVal version 1.2.0 Index]