Learn R Programming

RnavGraph (version 0.1.8)

scagGraph: Create a list of graphs, given the scagnostics edge weights

Description

scagGraph is useful to turn the output of scagEdgeWeights into a list of graphs.

Usage

scagGraph(edgeWeights, topFrac = 0.2)

Arguments

edgeWeights
List returned by the scagEdgeWeights function.
topFrac
Keep the nodes with the topFrac fraction of the scagnostic weights.

Value

graph object or a list of graph objects.

See Also

navGraph, scagNav, scagEdgeWeights

Examples

Run this code
data(olive)
ng.olive <- ng_data(name = "Olive",
		data = olive[,-c(1,2)],
		shortnames = c("p1","p2","s","ol","l1","l2","a","e"),
		group = as.numeric(olive$Area)+1
)

edgeWts <- scagEdgeWeights(data = ng.olive,
		scags = c("Clumpy", "Skinny"))
G1 <- scagGraph(edgeWts, topFrac = 0.2)

edgeWts <- scagEdgeWeights(data = ng.olive,
		scags = c("Clumpy", "Skinny"),
		combineFn = max)
G2 <- scagGraph(edgeWts, topFrac = 0.1)

## Now you can start a navGraph session
nav <- navGraph(ng.olive, G1)

nav <- navGraph(ng.olive, G2)

Run the code above in your browser using DataLab