- edited description
subscript out of bounds error
When I run the simple example code (see below the actual code I ran) I get the following error:
"Error in nodesi : subscript out of bounds"
This is the code I ran...
library(rgexf)
people <- matrix(c(1:4, 'juan', 'pedro', 'matthew', 'carlos'),ncol=2)
relations <- matrix(c(1,4,1,2,1,3,2,3,3,4,4,2), ncol=2, byrow=T)
write.gexf(people, relations)
Comments (6)
-
reporter -
repo owner Dear Tim,
This issue was declared and solved in the Issue
#7(please see). The thing is that you should use data.frames instead of matrix.Thanks anyway!
George
-
repo owner - changed status to duplicate
Duplicate of
#7. -
reporter Thanks for this... and my apologies for the duplicate.
-
reporter Here's some sample code (for others to follow)
library(rgexf)
people <- data.frame(node=c(1:4), label=c('juan', 'pedro', 'matthew', 'carlos'))
people
relations <- data.frame(source=c(1,1,1,1), target=c(2,3,4,2))
relations
write.gexf(people, relations)
-
repo owner Thanks Tim!
- Log in to comment