rate_policies: Rate policy records

View source: R/rate_policies.R

rate_policiesR Documentation

Rate policy records

Description

Apply a rating plan to every row and coverage in a policy-level data frame, returning only the resulting rated data. Plans using supported standard rating operations are evaluated with a vectorized batch engine. Plans using unsupported operations fall back to the general trace-capable engine.

Usage

rate_policies(rating_data, plan, validate = TRUE)

Arguments

rating_data

A data frame containing one row per policy or rating record.

plan

A rating_plan object created by new_rating_plan().

validate

Logical. If TRUE, validate rating_data before rating.

Value

A data frame containing the original rating data plus one ⁠indicated_<coverage>⁠ column for each coverage in the rating plan.

Examples

ex <- example_rating_plan()

rated <- rate_policies(
  rating_data = ex$policies,
  plan = ex$plan
)

rated


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