PCMSetAttribute: Set an attribute of a named member in a PCM or other named...

View source: R/PCM.R

PCMSetAttributeR Documentation

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

Description

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

Usage

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.

Details

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

Value

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

Examples

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

venelin/PCMBase documentation built on March 14, 2024, 8:24 p.m.