Description Usage Arguments Details Value References Examples

Compute the benefit-cost ratio between two alternatives

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
benefitcost(
ic1,
n1,
ac1,
ab1,
i1,
salvage1,
ic2,
n2,
ac2,
ab2,
i2,
salvage2,
option1,
option2,
table = c("ptable", "rtable", "both")
)
``` |

`ic1` |
numeric vector that contains the initial cost for option 1 |

`n1` |
numeric vector that contains the useful life (years) for option 1 |

`ac1` |
numeric vector that contains the annual cost [operations & maintenance (O&M)] for option 1 |

`ab1` |
numeric vector that contains the annual benefits for option 1 |

`i1` |
numeric vector that contains the effective interest rate per period as a percent for option 1 |

`salvage1` |
numeric vector that contains the salvage value for option 1 |

`ic2` |
numeric vector that contains the initial cost for option 2 |

`n2` |
numeric vector that contains the useful life (years) for option 2 |

`ac2` |
numeric vector that contains the annual cost [operations & maintenance (O&M)] for option 2 |

`ab2` |
numeric vector that contains the annual benefits for option 2 |

`i2` |
numeric vector that contains the effective interest rate per period as a percent for option 2 |

`salvage2` |
numeric vector that contains the salvage value for option 2 |

`option1` |
character vector that contains the name of option for option 1 |

`option2` |
character vector that contains the name of option for option 2 |

`table` |
character vector that contains the table output format (ptable, rtable, or both) |

Benefit is expressed as

*Benefit = AB≤ft[\frac{≤ft(1 + i\right)^n - 1}{i≤ft(1 + i\right)^n}\right]*

*Benefit*the present equivalent benefit

*AB*the annual benefit

*i*the "effective interest rate" per year

*n*the number of years

Cost is expressed as

*Cost = PC + OM≤ft[\frac{≤ft(1 + i\right)^n - 1}{i≤ft(1 + i\right)^n}\right] - S≤ft[\frac{1}{≤ft(1 + i\right)^n}\right]*

*Cost*the present equivalent cost

*PC*the present or initial cost

*OM*the annual operations & maintenance cost

*S*the salvage value

*i*the "effective interest rate" per year

*n*the number of years

Benefit-Cost ratio is expressed as

*BC = \frac{B_2 - B_1}{C_2 - C_1} ≥q 1*

*BC*the present equivalent cost

*B_1*the benefit for alternative 1

*B_2*the benefit for alternative 2

*C_1*the cost for alternative 1

*C_2*the cost for alternative 2

`data.table`

with character vectors with the monetary
values having thousands separator in a pretty table (ptable) & message with
the best option, data.frame with numeric vectors without the thousands
separator in regular table (rtable) & a message with the best option, or both
options combined in a list

Michael R. Lindeburg, PE,

*EIT Review Manual*, Belmont, California: Professional Publications, Inc., 1996, page 14-2, 14-4.William G. Sullivan, Elin M. Wicks, and C. Patrick Koelling,

*Engineering Economy*, Fourteenth Edition, Upper Saddle River, New Jersey: Pearson/Prentice Hall, 2009, page 133, 142, 442-443, 452-453.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ```
library("iemisc")
# Example from Lindeburg Reference text (page 14-4)
benefitcost(ic1 = 300000, n1 = 10, ac1 = 45000, ab1 = 150000, i1 = 10,
salvage1 = 0, ic2 = 400000, n2 = 10, ac2 = 35000, ab2 = 200000, i2 = 10,
salvage2 = 10000, option1 = "A", option2 = "B", table = "rtable")
# This is useful for saving the results as the named data.frame rtable
rtable <- benefitcost(ic1 = 300000, n1 = 10, ac1 = 45000, ab1 = 150000,
i1 = 10, salvage1 = 0, ic2 = 400000, n2 = 10, ac2 = 35000, ab2 = 200000,
i2 = 10, salvage2 = 10000, option1 = "A", option2 = "B", table = "rtable")
rtable
# This is useful for saving the results as the named data.frame ptable
ptable <- benefitcost(ic1 = 300000, n1 = 10, ac1 = 45000, ab1 = 150000,
i1 = 10, salvage1 = 0, ic2 = 400000, n2 = 10, ac2 = 35000, ab2 = 200000,
i2 = 10, salvage2 = 10000, option1 = "A", option2 = "B", table = "ptable")
ptable
# This is useful for saving the results as the named list of 2 data.frames
# called both
both <- benefitcost(ic1 = 300000, n1 = 10, ac1 = 45000, ab1 = 150000,
i1 = 10, salvage1 = 0, ic2 = 400000, n2 = 10, ac2 = 35000, ab2 = 200000,
i2 = 10, salvage2 = 10000, option1 = "A", option2 = "B", table = "both")
both
# Example 10-8 from the Sullivan Reference text (page 452-453)
project <- benefitcost(ic1 = 750000, n1 = 35, ac1 = 120000, ab1 = 245000,
i1 = 9, salvage1 = 0, ic2 = 625000, n2 = 25, ac2 = 110000, ab2 = 230000,
i2 = 9, salvage2 = 0, option1 = "Project I", option2 = "Project II",
table = "rtable")
project
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.