expSize.Rd
This function takes a records file and the same arguments as the addExposures function to estimate the size of the output created. The upper bound is pretty reasonable. The idea with this function is that it enables users to determine if they can reasonably perform an operation on their computer.
expSize(records, type = "PY", lower_year = NULL, upper_year = NULL)
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". Many other variations on this. |
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. |
An upper bound for the number of rows used in the calculation of an exposure frame.
addExposures(records)#> # A tibble: 24 x 5 #> key duration start_int end_int exposure #> <chr> <dbl> <date> <date> <dbl> #> 1 B10251C8 1 2010-04-10 2011-04-09 0.999 #> 2 B10251C8 2 2011-04-10 2012-04-09 1.00 #> 3 B10251C8 3 2012-04-10 2013-04-09 0.999 #> 4 B10251C8 4 2013-04-10 2014-04-09 0.999 #> 5 B10251C8 5 2014-04-10 2015-04-09 0.999 #> 6 B10251C8 6 2015-04-10 2016-04-09 1.00 #> 7 B10251C8 7 2016-04-10 2017-04-09 0.999 #> 8 B10251C8 8 2017-04-10 2018-04-09 0.999 #> 9 B10251C8 9 2018-04-10 2019-04-04 0.986 #> 10 D68554D5 1 2005-01-01 2005-12-31 0.999 #> # ... with 14 more rows