addExposures: Create an exposure data frame

View source: R/exposure_functions.R

addExposuresR Documentation

Create an exposure data frame

Description

This function takes a records file with unique policy identifiers in the column "key", exposure start dates in column "start" and exposure end dates in column "end". The output is a data frame with exposures and durations for time intervals.

Usage

addExposures(records, type = "PY", lower_year = NULL,
  upper_year = NULL)

Arguments

records

File containing a unique policy key with start and end dates.

type

Creates policy year rows for the default type = "PY". Creates policy month rows for type = "PM".

lower_year

A lower year for truncation to reduce calculation time and output size.

upper_year

An upper year for truncation to reduce calculation time and output size.

Value

A data frame with multiple rows for each unique policy key. Each row represents a policy interval.

Examples

addExposures(records)

Actuary-Helper/expstudies documentation built on Aug. 6, 2022, 3:55 p.m.