Description Usage Arguments Value Examples
View source: R/project_table.R
This function takes a table with an edge list, where the first two columns
describe the source and target vertices/nodes of multiple edges. It will
return an edge list of a projected network with the joining_col
vertices removed.
1 | project_table(df, joining_col)
|
df |
A data.frame with the oribinal bimodal edge list |
joining_col |
The quoted name of the column with the node ids that will be removed from the projected graph |
A data.frame edgelist with the columns from
and to
each
containing IDs from joining_col
, along with a weight
column.
1 2 3 4 5 6 7 8 9 | bipartite_list <- data.frame(
club = c("Karate", "Karate", "Book", "Chess", "Book", "Chess"),
student = c(1, 2, 1, 3, 2, 4),
stringsAsFactors = FALSE)
project_table(bipartite_list, joining_col = "club")
#> from to weight
#> 1 1 2 2
#> 2 3 4 1
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.