View source: R/exportInsuranceContract_xlsx.R
exportInsuranceContract.xlsx | R Documentation |
Export an insurance act object tocontract (object of class InsuranceContract) to an Excel file
exportInsuranceContract.xlsx(contract, filename)
contract |
The insurance contract to export |
filename |
Target Excel filename for export |
The function exportInsuranceContract.xlsx
exports an object
of class InsuranceContract to an Excel file. All basic data, as well as
the time series of (absolute and unit) cash flows, reserves, premiums, premium
composition and all profit participation scenarios are exported to the file
in nicely looking tables.
No new calculations are done in this function. It only prints out the values
stored in contract$Values
.
library("MortalityTables") mortalityTables.load("Austria_Annuities_AVOe2005R") # A trivial deferred annuity tariff with no costs: tariff = InsuranceTarif$new(name = "Test Annuity", type = "annuity", tarif = "Annuity 1A", mortalityTable = AVOe2005R.unisex, i=0.01) contract = InsuranceContract$new( tariff, age = 35, YOB = 1981, policyPeriod = 30, premiumPeriod = 15, deferralPeriod = 15, sumInsured = 1000, contractClosing = as.Date("2016-10-01") ); ## Not run: exportInsuranceContract.xlsx(contract, "Example_annuity_contract.xlsx")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.