Description Usage Arguments Examples
This function turns a list of edgelists (data.frames) into a single "master" edgelist. It maintains the edge attributes of each individual edge list
1 | mergeEdgeLists(edgeLists, from = "from.ID", to = "to.ID", keepDups = F)
|
edgeLists |
list of edgelists (stored as data.frames) |
from |
name of the column that specifies the "from" node in each data.frame in |
to |
name of the column that specifies the "to" node in each data.frame in |
keepDups |
deletes duplicate from-to relations when set to FALSE |
1 2 3 4 5 6 7 8 9 10 | require('igraph')
cars <- data.frame(mtcars, to=sample(rownames(mtcars), replace=T), from=sample(rownames(mtcars), replace=T))
df1<-cars[sample(1:32,30), c('to', 'from', 'cyl', 'mpg')]
df2<-cars[sample(1:32,15), c('to', 'from', 'cyl', 'qsec')]
df3<-cars[sample(1:32,32), c('to', 'from', 'hp', 'drat')]
df1$cyl[1:10] <- df1$cyl[1:10]+2
el <- list(df1, df2, df3)
mel <- mergeEdgeLists(el, from='from', to='to', keepDups=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.