| connectedComponents | R Documentation |
This function finds the connected components of a graph represented as a data frame.
connectedComponents(df, colName = "component")
df |
A data frame with two categorical columns representing the edges of a graph. |
colName |
Name of the connected components column to be added. |
A data frame with a column indicating the connected component of each edge.
df <- data.frame(
gene1 = paste0('G', c(1, 2, 6, 7, 8, 9,
11, 25, 32, 17, 18)),
gene2 = paste0('G', c(2, 8, 8, 8, 1, 25,
32, 24, 24, 26, 26))
)
connectedComponents(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.