fill_in_zeros: Add rows and fill 0s

Description Usage Arguments Value

View source: R/fill_in_zeros.R

Description

When making features based on claims data, it is often the case that some people in your sample will not have any claims. fill_in_zeros() adds these individuals to the data.frame generated from the claims data and fills in a value of 0 for these people with no claims.

Usage

1
fill_in_zeros(DT, DT_id, id_name)

Arguments

DT

a data.table generated from claims data

DT_id

a data.table with all IDs in analytic sample

id_name

name of id column(s) that are in both DT and DT_id

Value

data.frame with added rows and 0s


evanjflack/cfo.behavioral documentation built on Oct. 10, 2020, 11:52 p.m.