igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] igraph error


From: Lu Yang
Subject: [igraph] igraph error
Date: Wed, 27 Jun 2018 12:00:02 -0400

Hi, igraph team, ;-)


Thanks for creating the awesome tool.
I got the error when using the code below and the data enclosed. I do not know why. Since it work for basic plot, but it got the error in the other plot.
Hope to get help. Thanks in advance.
`library(igraph)

nodes000 <- read.xlsx("nodes.xlsx")
links000 <- read.xlsx("links.xlsx")
nrow(nodes000); length(unique(nodes000$genus))
nrow(links000); nrow(unique(links000[,c("from", "to")]))
links000 <- aggregate(links000[,3], links000[,-3], sum)
links000 <- links000[order(links000$from, links000$to),]
rownames(links000) <- NULL
net <- graph_from_data_frame(d=links000, vertices=nodes000, directed=F)
plot(net, edge.arrow.size=.4,vertex.label=NA) # It works
colrs <- c("grey", "tomato")
V(net)$color <- colrs[V(net)$type]
V(net)$size <- V(net)$logreads*2.5
V(net)$label.color <- "black"
V(net)$label <- NA
E(net)$width <- E(net)$x/6
E(net)$arrow.size <- .3
E(net)$edge.color <- "white"
E(net)$width <- 1+E(net)$x/12
plot(net, vertex.label.font=1,vertex.label.cex=.5) #got error(Error in symbols(x = coords[, 1], y = coords[, 2], bg = vertex.color, : invalid symbol parameter)

Best regards.

Attachment: links.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Attachment: nodes.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


reply via email to

[Prev in Thread] Current Thread [Next in Thread]