Re: [R] network plot problem

2012-07-28 Thread Rui Barradas
Hello, It's more or less the same it was with vertices. If the edge labels represent weights, then create an appropriate attribute and set the labels' values to that attribute's values: E(g)$weight <- something # keep the weights in a separate attribute E(g)$label <- E(g)$weight # set w

Re: [R] network plot problem

2012-07-28 Thread Vlatka Matkovic Puljic
Is it possible to write a numbers of link next to lines of the network? For exmple, I have 3 trials that have studied two drugs in network. So, now it seems all links are of same weight. 2012/7/27 Vlatka Matkovic Puljic > Thank you! > > It works fine now! :) > > 2012/7/27 Rui Barradas > >

Re: [R] network plot problem

2012-07-27 Thread Vlatka Matkovic Puljic
Thank you! It works fine now! :) 2012/7/27 Rui Barradas > Hello, > > As for the directed = FALSE, it works with me: > > g <- graph(given, directed = FALSE) > > As for the label, it's easy. Create an attribute 'name' and then set the > label to that attribute. For instance, using the alphabet's

Re: [R] network plot problem

2012-07-27 Thread Rui Barradas
Hello, As for the directed = FALSE, it works with me: g <- graph(given, directed = FALSE) As for the label, it's easy. Create an attribute 'name' and then set the label to that attribute. For instance, using the alphabet's letters, first uppercase. V(g)$name <- c(LETTERS, letters)[V(g)] #

Re: [R] network plot problem

2012-07-27 Thread Vlatka Matkovic Puljic
Thank you Rui. With matrix works better. I got plot I have expected to have. I want to be undirected. But directed = FALSE or as.undirected(graph) are not working? Where I'd gone wrong? Shouldn't it be possible to add names instead of numbers of nods with vertex.label= ? 2012/7/26 Rui Barr

Re: [R] network plot problem

2012-07-25 Thread Rui Barradas
Hello, I don't see the problem. given <- scan(text=" 15 2 10 4 10 4 10 4 13 4 13 4 15 4 18 4 11 5 2 6 7 6 7 6 7 6 12 6 15 6 15 6 19 6 22 6 24 6 6 7 5 12 5 12 7 12 11 12 13 12 13 12 13 12 13 12 16 12 17 12 23 12 23 12 23 12 23 12 6 13 12 13 6 14 6 15 9 15 12 15 13 15 17 16 16 17 1 18 12 18 23 18

[R] network plot problem

2012-07-25 Thread Vlatka Matkovic Puljic
**Hi, I wanted to create a network of drugs that are being studied together. So, I created a file as a graph. But plot of my network is not corect! It looks like to me that something else is lying behind this network links created. Could someone help me with this? Thanx! a<-read.graph(file=file