Learn R Programming

scoringutils (version 0.1.7.2)

range_long_to_quantile: Change Data from a Range Format to a Quantile Format

Description

Transform data from a format that uses interval ranges to denote quantiles to a format that uses quantiles only.

Given a data.frame that follows the structure shown in range_example_data_long, the function outputs the same data in a long format as (as shown in range_example_data_long). This can be useful e.g. for plotting. If you're data.frame is in a different format, consider running range_long_to_wide first.

Usage

range_long_to_quantile(data, keep_range_col = FALSE)

Arguments

data

a data.frame following the specifications from eval_forecasts) for quantile forecasts. For an example, see range_example_data_long)

keep_range_col

keep the range and boundary columns after transformation (default is FALSE)

Value

a data.frame in a plain quantile format

Examples

Run this code
# NOT RUN {
wide <- scoringutils::range_example_data_wide
long <- scoringutils::range_wide_to_long(wide)

plain_quantile <- range_long_to_quantile(long)

# }

Run the code above in your browser using DataLab