Learn R Programming

WARDEN (version 0.99.1)

modify_item: Modify the value of existing items

Description

Modify the value of existing items

Usage

modify_item(list_item)

Value

No return value, modifies/adds item to the environment and integrates it with the main list for storage

Arguments

list_item

A list of items and their values or expressions

Details

The functions to add/modify events/inputs use lists. Whenever several inputs/events are added or modified, it's recommended to group them within one function, as it reduces the computation cost. So rather than use two modify_item with a list of one element, it's better to group them into a single modify_item with a list of two elements.

Costs and utilities can be modified by using the construction type_name_category, where type is either "qaly" or "cost", name is the name (e.g., "default") and category is the category used (e.g., "instant"), so one could pass cost_default_instant and modify the cost. This will overwrite the value defined in the corresponding cost/utility section.

This function is intended to be used only within the add_reactevt function in its input parameter and should not be run elsewhere or it will return an error.

Examples

Run this code
add_reactevt(name_evt = "idfs",input = {modify_item(list("cost.it"=5))})

Run the code above in your browser using DataLab