Set an attribute of a named member in a PCM or other named list object

PCMSetAttribute(
  name,
  value,
  object,
  member = "",
  spec = TRUE,
  inplace = TRUE,
  ...
)

Arguments

name

a character string denoting the attribute name.

value

the value for the attribute.

object

a PCM or a list object.

member

a member expression. Member expressions are character strings denoting named elements in a list object (see examples). Default: "".

spec

a logical (TRUE by default) indicating if the attribute should also be set in the corresponding member of the spec attribute (this is for PCM objects only).

inplace

logical (TRUE by default) indicating if the attribute should be set to the object in the current environment, or a modified object should be returned.

...

additional arguments passed to MatchListMembers.

Value

if inplace is TRUE (default) nothing is returned. Otherwise, a modified version of object is returned.

Details

Calling this function can affect the attributes of multiple members matched by the member argument.

Examples

model <- PCMBaseTestObjects$model_MixedGaussian_ab PCMSetAttribute("class", c("MatrixParameter", "_Fixed"), model, "H")