rate_one_row_one_coverage: Rate one record for one coverage

View source: R/rate_core.R

rate_one_row_one_coverageR Documentation

Rate one record for one coverage

Description

Execute the applicable rating specification one step at a time for a single record and coverage.

Usage

rate_one_row_one_coverage(row, coverage, plan, row_number = 1)

Arguments

row

A one-row data frame containing the rating record.

coverage

A character string identifying the coverage to rate.

plan

A rating_plan object created by new_rating_plan().

row_number

An integer identifying the row within the source rating data. This value is included in the trace output.

Value

A list with two elements: value, containing the final indicated value, and trace, containing one trace row per rating-specification step.

Examples

ex <- example_rating_plan()

answer <- rate_one_row_one_coverage(
  row = ex$policies[1, , drop = FALSE],
  coverage = "BI",
  plan = ex$plan,
  row_number = 1
)

answer$value
answer$trace

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