Learn R Programming

scoringutils (version 0.1.4)

quantile_to_range: Change Data from a Plain Quantile Format to a Range Format

Description

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

Given a data.frame that follows the structure shown in quantile_example_data_plain, the function outputs the same data in a long format as (as shown in quantile_example_data_long).

Usage

quantile_to_range(data, keep_quantile_col = TRUE)

Arguments

data

a data.frame following the specifications shown in the example quantile_example_data_long)

keep_quantile_col

keep the quantile column in the final output after transformation (default is FALSE)

Value

a data.frame in a long interval range format

Examples

Run this code
# NOT RUN {
quantile_plain <- scoringutils::quantile_example_data_plain

long <- scoringutils::quantile_to_range(quantile_plain)

# }

Run the code above in your browser using DataLab