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

+.twig_classR Documentation

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 class 'twig_class'
twig_obj + layer

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.

Value

The modified twig object with the new layer added.

Examples

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

twig documentation built on April 12, 2025, 2:08 a.m.