addCF: Add a Cash Flow record to the Cash Flow data frame

Description Usage Arguments Value Examples

Description

Here are the types that describe when a cash flow starts or ends: yr indicates a numeric value will be supplied such as 1 to start year one and 10 to end year 10. p1age, p2age is the age of person1 or person 2 p1ret, p2ret is the retirement age of person1 or person 2 p1death, p2death is the age at death of person1 or person 2 1stdeath, 2nddeath is the death of the 1st to die, or the 2nd to die start is first year (equivalent to startType=='yr' and specifying 1 for the start) end is last year

Usage

1
2
addCF(simCF, description, startType, start, endType, end, type, amount,
  inflationAdj)

Arguments

simCF

The data frame to which to add a cash flow

description

Description of cash flow

startType

Type of starting period.

start

numeric value representing startType='yr' or 'p1age

endType

Type of ending period.

end

numeric value representing endType='yr' or 'p1age

type

either 'c' for contribution or 'w' for withdrawal

amount

dollar amount of cash flow

inflationAdj

logical to indicate whether cash flow is to be adjusted for inflation.

Value

A data frame with the cash flows of the simulation and the added cash flow

Examples

1
2
3
4
5
6
## Not run: simCF <- addCF(simCF, description, startType, start,
                   endType, end, type, amount, inflationAdj)
## End(Not run)
## Not run: simCF <- addCF(simCF, "Retirement Expense", "p1ret", 0,
                   "p1death", 0, "w", 40000, TRUE)
## End(Not run)

rexmacey/aasim documentation built on May 29, 2019, 5:42 a.m.