View source: R/trace_helpers.R
| append_rating_factors | R Documentation |
Reshape normalized trace rows into wide applied-value columns and join them to the rated records.
append_rating_factors(rated_data, term_trace, by = "row_number")
rated_data |
A data frame containing rated policy or entity records. |
term_trace |
A data frame containing normalized rating trace rows. |
by |
A character vector naming the columns used both to reshape
|
The function creates or replaces a row_number column in rated_data using
its current row order.
A data frame containing the rated records, a generated row_number
column, and wide step_<number>_<term> columns containing applied step
values.
ex <- example_rating_plan()
result <- rate_policies_with_trace(
ex$policies,
ex$plan
)
append_rating_factors(
rated_data = result$rated_data,
term_trace = result$term_trace,
by = "row_number"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.