Learn R Programming

twig (version 1.0.0.0)

+.twig_class: Define a method for the + operator for twig objects

Description

Adds layers to the twig object. If a states layer is added, the twig object is treated as a Markov model.

Usage

# S3 method for twig_class
+(twig_obj, layer)

Value

The modified twig object with the new layer added.

Arguments

twig_obj

A twig object created by the twig function.

layer

A layer to be added to the twig object.

Details

This method allows layers to be added to a twig object using the + operator.

Examples

Run this code
twig_obj <- twig() + 
  decisions(names = c(StandardOfCare, StrategyA, StrategyB, StrategyAB))

Run the code above in your browser using DataLab