Value of an attribute of an object or values for an attribute found in its members

PCMGetAttribute(name, object, member = "", ...)

Arguments

name

attribute name.

object

a PCM model object or a PCMTree object.

member

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

...

additional arguments passed to MatchListMembers.

Value

if member is an empty string, attr(object, name). Otherwise, a named list containing the value for the attribute for each member in object matched by member.

Examples

PCMGetAttribute("class", PCMBaseTestObjects$model_MixedGaussian_ab)
#> [1] "MixedGaussian_ab" "MixedGaussian" "GaussianPCM" "PCM"
PCMGetAttribute( "dim", PCMBaseTestObjects$model_MixedGaussian_ab, member = "$Sigmae_x")
#> $`$'a'$'Sigmae_x'` #> [1] 3 3 1 #> #> $`$'b'$'Sigmae_x'` #> [1] 3 3 1 #>