lookup_exact_value: Look up an exact rating-table value

View source: R/lookup.R

lookup_exact_valueR Documentation

Look up an exact rating-table value

Description

Select the single most specific factor-table row that matches a rating record, coverage, term, rate-set metadata, and variable-level conditions.

Usage

lookup_exact_value(row, coverage, plan, term_name)

Arguments

row

A one-row data frame containing the rating record.

coverage

A character string identifying the coverage being rated.

plan

A rating_plan object created by new_rating_plan().

term_name

A character string identifying the rating term to look up.

Value

A list containing the selected numeric value, the value source, the looked-up value, and the matching factor-row identifier.

Examples

ex <- example_rating_plan()
policy <- ex$policies[1, , drop = FALSE]

answer <- lookup_exact_value(
  row = policy,
  coverage = "BI",
  plan = ex$plan,
  term_name = "territory"
)

answer$value
answer$factor_row_id

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