clean_claims: Clean claims

Description Usage Arguments Details Examples

Description

Adjust the column names of a data.table of claims so that the resulting column names match the required names for claimz functions.

Usage

1
clean_claims(claims, colmap = NULL)

Arguments

claims

data.table object

colmap

a mapping of column names in the form of a named character vector, or NULL

Details

Returns a data.table object, a copy of claims with required column names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(data.table)

# Sample claims
claimz
claims <- copy(claimz)
setnames(claims, c("ClaimID"), c("claim_id"))
colmap <- c(
  "ClaimID"="claim_id",
  "PolicyID"="PolicyID",
  "EffectiveDate"="EffectiveDate",
  "ExpirationDate"="ExpirationDate",
  "DateOfLoss"="DateOfLoss",
  "ReportDate"="ReportDate"
)
clean_claims(claims, colmap)

ben519/claimz documentation built on May 12, 2019, 10:56 a.m.