Target: Target

Description Format Construction Active Field (read-only) Public Methods Examples

Description

Target is to be used within TransitionClassification or supply to event functions. If the target is dynamic then its get will return its target value at the current time or its closest time to the current time.

Format

R6::R6Class object inheriting Generic.

Construction

1

Active Field (read-only)

Public Methods

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# static target
TrgtStatic <- Target$new(x = list(yes = 10))
TrgtStatic$data
TrgtStatic$dynamic
TrgtStatic$get()

# dynamic target
target_dynamic <- data.frame(time = 1:10, yes = 1:10)
TrgtDynamic <- Target$new(x = target_dynamic)
TrgtDynamic$data
TrgtDynamic$dynamic

# if the `time` argument in `get()` is not specified then it will rely on
# the time step from the simulation clock from `.get_sim_time()`.
TrgtDynamic$get()
TrgtDynamic$get(1)
TrgtDynamic$get(10)

dymium-org/dymiumCore documentation built on July 18, 2021, 5:10 p.m.