Skip to contents

Modify the time of existing events

Usage

modify_event(evt, create_if_null = TRUE)

Arguments

evt

A list of events and their times

create_if_null

A boolean. If TRUE, it will create non-existing events with the chosen time to event. If FALSE, it will ignore those.

Value

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

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_event with a list of one element, it's better to group them into a single modify_event with a list of two elements.

This function does not evaluate sequentially.

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

add_reactevt(name_evt = "idfs",input = {modify_event(list("os"=5))})
#> $idfs
#> $idfs$react
#> {
#>     modify_event(list(os = 5))
#> }
#> 
#>