powered by
This function returns the connected components of vertices from a graph data frame in which edges have been assigned connected components.
vertexComponents(df, colName = "component")
A factor vector representing the connected component of each vertex.
A data frame with two categorical columns representing graph edges and a connected components column.
Name of the connected components column.
df <- data.frame(gene1 = c('A', 'B', 'C', 'A'), gene2 = c('B', 'D', 'F', 'G'), component = c(1, 1, 2, 1)) vertexComponents(df)
Run the code above in your browser using DataLab