Learn R Programming

scoringutils (version 0.1.7.2)

sample_to_quantile: Change Data from a Sample Based Format to a Quantile Format

Description

Transform data from a format that is based on predictive samples to a format based on plain quantiles.

Usage

sample_to_quantile(data, quantiles = c(0.05, 0.25, 0.5, 0.75, 0.95), type = 7)

Arguments

data

a data.frame with samples

quantiles

a numeric vector of quantiles to extract

type

type argument passed down to the quantile function. For more information, see quantile

Value

a data.frame in a long interval range format

Examples

Run this code
# NOT RUN {
example_data <- scoringutils::integer_example_data

quantile_data <- scoringutils::sample_to_quantile(example_data)

# }

Run the code above in your browser using DataLab