"edges<-" {rggobi}R Documentation

Set edges

Description

Set edges for a dataset.

Usage

"edges<-"(x, value)

Arguments

x ggobiDataset
value matrix or data frame of edges. First column should be from edge, second column to edge.

Details

To remove edges, set edges to NULL.

@arguments ggobiDataset @arguments matrix or data frame of edges. First column should be from edge, second column to edge. @keyword manip

Author(s)

Hadley Wickham <h.wickham@gmail.com>

Examples

cc<-cor(t(swiss),use="p", method="s") 
ccd<-sqrt(2*(1-cc)) 
a <- which(lower.tri(ccd), arr.ind=TRUE)
src <- row.names(swiss)[a[,2]]
dest <- row.names(swiss)[a[,1]] 
weight <- as.vector(as.dist(ccd))
gg <- ggobi(swiss)
gg$cor <- data.frame(weight)
edges(gg$cor) <- cbind(src, dest)
edges(gg$cor)
edges(gg$cor) <- NULL

[Package rggobi version 2.1.3 Index]