Learn R Programming

scoringutils (version 0.1.4)

sample_to_range: Change Data from a Sample Based Format to a Interval Range Format

Description

Transform data from a format that is based on predictive samples to a format based on interval ranges

Usage

sample_to_range(data, range = c(0, 50, 90), type = 7, keep_quantile_col = TRUE)

Arguments

data

a data.frame with samples

range

a numeric vector of interval ranges to extract (e.g. c(0, 50, 90))

type

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

keep_quantile_col

keep quantile column, default is TRUE

Value

a data.frame in a long interval range format

Examples

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

quantile_data <- sample_to_range(example_data)

# }

Run the code above in your browser using DataLab