Learn R Programming

twig (version 1.0.0.0)

payoffs: Add payoffs to a twig object

Description

This function creates a payoffs layer that can be added to a twig object. The payoffs layer defines the payoffs and their associated discount rates.

Usage

payoffs(names, discount_rates = NULL)

Value

A list representing the payoffs layer.

Arguments

names

A character vector of payoff function names. They don't need to be included in quotes.

discount_rates

A numeric vector of discount rates for each payoff. If NULL, a discount rate of 0 is assumed for each payoff. discount_rates must have the same length as payoff names.

Examples

Run this code
payoffs_layer <- payoffs(names = c(cost, effectiveness), discount_rates = c(0.03, 0.03))

Run the code above in your browser using DataLab