I wrote a simple script to build graphs:

require("RSQLite")
require('igraph')
drv <- dbDriver("SQLite")
con <- dbConnect(drv, "case.db")
dataset <- dbGetQuery(con, "select * from stream")
table <- aggregate(rep(1, nrow(dataset)), by = list(identifier =
dataset$actor_id, name = dataset$actor, page = dataset$object_id), sum)
dataframe <- data.frame(from=table$identifier, to=table$page)
g <- graph.data.frame(dataframe)
V(g)$size <- table$x

This works fine as long as the records in the database are from one
object_id. As soon as there are multiple object_ids are involved, this
warning (in fact, error) occurs:

Warning message:
In vattrs[[name]][index] <- value :
  number of items to replace is not a multiple of replacement length

Can this be solved ?

Mark

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to