[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Problem with attributes
From: |
David Edwards |
Subject: |
[igraph] Problem with attributes |
Date: |
Fri, 4 Jun 2010 22:13:37 +0200 |
Hi
I need to display directed graphs so that any reciprocal edge-pairs are plotted
without arrows. The code
em1 <- c(0,0,1,1,1,0,1,1,1,1,0,1,1,1,1,0); dim(em1)<- c(4,4)
iG <- graph.adjacency(em1)
E(iG)$arrow.mode <- 2
E(iG)[is.mutual(iG)]$arrow.mode <- 0
iG$layout <- layout.graphopt
plot(iG)
works fine but when I change the graph slightly using instead
em1 <- c(0,1,1,1,1,0,1,1,1,1,0,1,1,1,1,0); dim(em1)<- c(4,4)
(which is symmetric, so all edges are reciprocal), plot gives the warning
Warning messages:
1: In if (code %in% c(2, 3)) { :
the condition has length > 1 and only the first element will be used
2: In if (code %in% c(1, 3)) { :
the condition has length > 1 and only the first element will be used
which I don't understand. What am I doing wrong?
Best regards,
David Edwards
- [igraph] Problem with attributes,
David Edwards <=