trace_to_excel_style: Reshape rating trace to an Excel-style step table

View source: R/trace_helpers.R

trace_to_excel_styleR Documentation

Reshape rating trace to an Excel-style step table

Description

Select and order the principal trace columns to produce a compact, human-readable view of the rating calculation.

Usage

trace_to_excel_style(term_trace)

Arguments

term_trace

A data frame containing normalized rating trace rows, typically from rate_policies_with_trace().

Value

A data frame ordered by row number, coverage, and step number. It contains the available columns among row_number, record_id, coverage, step_number, term_name, value_source, calculation_type, applied_value, value_before_step, and value_after_step.

Examples

ex <- example_rating_plan()

result <- rate_policies_with_trace(
  ex$policies,
  ex$plan
)

trace_to_excel_style(
  result$term_trace
)

ratingtables documentation built on Sept. 6, 2026, 1:06 a.m.