Description Usage Arguments Details Author(s) See Also Examples
Set edges for a dataset.
1 2 | ## S3 replacement method for class 'GGobiData'
edges(x) <- value
|
x |
GGobiData |
value |
matrix, data frame, or graph containing of edges. First column should be from edge, second column to edge. |
In GGobi, and edge dataset is a special type of dataset that has two additional (hidden) columns which specification source and destination row names. These rownames are compared to the row names of the dataset in the current plot, and if any match, it is possible to specify this dataset as an edge set to the plotted datset. When this is done, edges will be drawn between points specified by the edge dataset.
To remove edges, set edges to NULL.
Hadley Wickham <h.wickham@gmail.com>
ggobi_longitudinal
for creating edges which simulate time series plots
1 2 3 4 5 6 7 8 9 10 11 12 | if (interactive()) {
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}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.