cvtCF2Yr: Convert a Cash Flow Type to a Year

View source: R/aasim_functions.r

cvtCF2YrR Documentation

Convert a Cash Flow Type to a Year

Description

This returns the index value for the cash flow vector. The first element of the vector represents year 0 - the inception (now). And index value of 2 represents year 1 and so on.

Usage

cvtCF2Yr(cfType, sim, length, ageDeath1, ageDeath2, value)

Arguments

cfType

Cash flow type string

sim

sim(ulation) object

length

length of trial in years

ageDeath1

age of death of person 1 if applicable

ageDeath2

age of death of person 2 if applicable

value

start or end value from cash flow record

Details

cfType must be in "yr,start,end,p1age,p1ret,p1death,p2age,p2ret,p2death,1stdeath,2nddeath"

Value

integer representing year in which cash flow starts or ends

Examples

 ## Not run: cvtCF2Yr(cf$startType,sim,length,ageDeath1,ageDeath2,cf$start)

rexmacey/aasim documentation built on Oct. 29, 2024, 9:30 a.m.