Modify an attribute in the form of a key/value pair.

set_attribute(.trj, key, value, global = FALSE)

Arguments

.trj
the trajectory object.
key
the attribute key (coerced to a string).
value
the value to set, accepts either a numeric or a callable object (a function) which must return a numeric.
global
if TRUE, the attribute will be global instead of per-arrival.

Value

Returns the trajectory object.