Between-Class Neighbors for class_graph Objects
Source:R/class_graph.R
between_class_neighbors.class_graph.RdCompute the between-class neighbors of a class_graph object.
Usage
# S3 method for class 'class_graph'
between_class_neighbors(x, ng, ...)Examples
labs <- factor(c("a","a","b"))
cg <- class_graph(labs)
ng <- neighbor_graph(matrix(c(0,1,1,1,0,1,1,1,0),3))
between_class_neighbors(cg, ng)
#> $G
#> IGRAPH 9fb1ab7 U-W- 3 3 --
#> + attr: weight (e/n)
#> + edges from 9fb1ab7:
#> [1] 1--2 1--3 2--3
#>
#> $params
#> list()
#>
#> attr(,"class")
#> [1] "neighbor_graph"