set_attribute: Set Attributes

Description Usage Arguments Value See Also

View source: R/trajectory-activities.R

Description

Activity for modifying an arrival's attributes.

Usage

1
2
3
4
set_attribute(.trj, keys, values, global = FALSE, mod = c(NA, "+",
  "*"), init = 0)

set_global(.trj, keys, values, mod = c(NA, "+", "*"), init = 0)

Arguments

.trj

the trajectory object.

keys

the attribute name(s), or a callable object (a function) which must return attribute name(s).

values

numeric value(s) to set, or a callable object (a function) which must return numeric value(s).

global

global=TRUE is deprecated. Use *_global instead.

mod

if set, values modify the attributes rather than substituting them.

init

initial value, applied if mod is set and the attribute was not previously initialised. Useful for counters or indexes.

Value

Returns the trajectory object.

See Also

get_attribute, get_global, timeout_from_attribute, timeout_from_global.


r-simmer/simmer documentation built on Sept. 10, 2018, 5:29 p.m.