Displaying 1 result from an estimated 1 matches for "edgeslength".
2011 Jun 01
0
Plot a network with edges of specified length
...of the network package. Assume my network has the following
adjacency matrix:
a b c
a 0 0 0
b 1 0 0
c 1 0 0
so that b and c are linked to a. I would like to specify that the length of
the edge from b to a is 10 times longer than the one from c to a. So I set
the following edge attribute:
> edgesLength=matrix(0,nrow=3,ncol=3)
> edgesLength[2,1]=10
> edgesLength[3,1]=1
> set.edge.attribute(network,"edgesLength",1,e=1:length(network$mel))
> set.edge.value(network,"edgesLength",edgesLength,e=1:length(network$mel))
and then use the plot command:
plot.network(network,...