explain_rating: Explain a rating calculation

View source: R/trace_helpers.R

explain_ratingR Documentation

Explain a rating calculation

Description

Extract and format the rating trace for one source-data row and, optionally, one coverage.

Usage

explain_rating(rating_result, row_number = 1, coverage = NULL)

Arguments

rating_result

A rating_result object returned by rate_policies_with_trace().

row_number

An integer identifying the source-data row to explain.

coverage

An optional character string identifying the coverage to include. If NULL, all coverages for the row are returned.

Value

An Excel-style data frame showing the selected rating steps in calculation order.

Examples

ex <- example_rating_plan()

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

explain_rating(
  rating_result = result,
  row_number = 1,
  coverage = "BI"
)

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