View source: R/make_portfolio.R
make_portfolio | R Documentation |
This function standardizes and validates raw insurance portfolio data to prepare it for simulation. It ensures all necessary fields are correctly mapped and conform to required formats. If no column mapping is provided, the user will be prompted interactively.
make_portfolio(data, cols = NULL)
data |
A data.frame containing raw insurance portfolio data. |
cols |
A named list with column mappings. The list should include:
|
A cleaned data.frame with standardized column names:
unique_id
, client_id
, duration
,
mortality
, lapse
, nar
, rate
.
make_portfolio(example_portfolio, cols = list(
unique_id = "POL_ID",
client_id = "CLIENT_ID",
duration = "DURATION",
mortality = "MORTALITY",
lapse = "LAPSE",
nar = "NAR",
rate = "RATE"
))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.