Gábor Csárdi schrieb:
Hi Knut,
What about subtracting one?
graph(data-1, directed=TRUE)
yes that is what i mean and did with 0 to n-1
but the item numbers in all other figures are from 1 to n
2. is it possible to change the thickness of the lines depending of the
interactions between the nodes automatically?
It depends what you mean by 'automatically'.
means: Do I have to calculate by myself that there are
4 1> 0
2 2 >1
1 2>0
1 1>3
or is there any "switch" to set the different V(g)$size and E(g)$width
to get the following result:
iigraph_data <-c(1,0, 1,0, 1,0, 1,0, 2,1, 2,0, 2,1, 1,3)
g <- graph( igraph_data,n=max(igraph_data), directed=TRUE )
V(g)$size <- c(40,20,10,10)
E(g)$width <- c(4,4,4,4,2,1,1,1)
E(g)$arrow.size <- 1
plot.igraph(g, layout=layout.kamada.kawai, vertex.label.font=2)
With kind regards Knut
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.