View source: R/gr_RootDepSet.R
Neighborhood | R Documentation |
Neighborhood
It is a subclass of RootDepSet
.
It creates an object with two empty slots $value
for the collection of subsets and $root
for the roots
associated to each of the subsets in $value
.
Every node with observable variable should be taken as a root.
A subset of nodes is created for every root.
For every root the subset of nodes is created on the principle of neighborhood of some order.
The slots are supposed to be assigned values.
The simplest one is using method setRootDepSet
. For other examples see Vignette "Subsets and Coordinates".
Neighborhood()
An object with two empty slots $value
for the collection of subsets and $root
seg<- graph(c(1,2, 2,3, 2,4, 4,5, 5,6, 5,7), directed = FALSE) name_stat<- c("paris", "2", "meaux", "melun", "5", "nemours", "sens") seg<- set.vertex.attribute(seg, "name", V(seg), name_stat) rdsobj<- Neighborhood() rdsobj # the slots are empty rdsobj<- subset(rdsobj, 2, seg) rdsobj # the slots are filled under the criterion of neighborhood of order 2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.