setRootDepSet: Setter for objects of class 'RootDepSet'

View source: R/gr_setters.R

setRootDepSetR Documentation

Setter for objects of class RootDepSet

Description

It is used to set the slots $value and $root of an object of class RootDepSet and its subclasses, such as Neighborhood and FlowConnect. Every node in the graph with observable variable must be taken as a root. For a fixed root, a subset of nodes must be chosen.

Usage

setRootDepSet(obj, subset, root, ...)

## S3 method for class 'RootDepSet'
setRootDepSet(obj, subset, root, ...)

Arguments

obj

Object of class RootDepSet

subset

list containing the subsets on the set of vertices, referred by their names. An element of the list should be named with the name of the corresponding root to that subset.

root

One dimensional array of the roots, corresponding to the subsets above referred by name.

...

additional arguments

Value

An object of class RootDepSet with non empty slots $value and $root which are assigned the arguments subset and root respectively.

Examples

rds<- RootDepSet()
rds_values<- list(a = c("a", "b"), b = c("b", "c", "d"))
rds_roots<- c("a", "b")
rds<- setRootDepSet(rds, rds_values, rds_roots)

gremes documentation built on Feb. 16, 2023, 8:06 p.m.