Displaying 2 results from an estimated 2 matches for "myedges".
Did you mean:
merges
2010 Dec 01
1
Graph in R with edge weights
...nly found here
http://www.bioconductor.org/packages/release/bioc/vignettes/Rgraphviz/inst/doc/Rgraphviz.pdf-
Using edge weights for labels, but...
Here an example:
> library("graph"); library(Rgraphviz)
> myNodes = c("s", "p", "q", "r")
> myEdges = list(
s = list(edges = c("p", "q")),
p = list(edges = c("p", "q")),
q = list(edges = c("p", "r")),
r = list(edges = c("s")))
> g = new("graphNEL", nodes = myNodes,
edgeL = myEdges, edgemode =
"directed")...
2009 Dec 04
0
Network Graph Add Labels
...successfully plotted my network. I simply want to add labels to my vertices, with the label corresponding to the data I fed into the edgelist. For simplicity sake, my edgelist looks like
1 4
3 4
I want to plot the labels, 1, 3, 4, and so on.
Here is my code.
library(network)
path <- path
myedges <- read.table(path)
net <- network(myedges)
plot(net)
Any help will be greatly appreciated. I am not looking to do advanced analysis, just plotting it to get going is all I really need.
Many thanks in advance for help and/or suggestions,
Brock