Skip to contents

Count the graph frequency of co-occurences/Co-mentioning of triplets

Usage

count_graphs(graph, loop = FALSE)

Arguments

graph

a graph of co-occurrence

loop

if TRUE, include loops. Default=FALSE

Examples

DF <- data.frame(n1 = c("Sample1", "Sample1", "Sample2", "Sample2"), n2 = c("A1", "Sample1", "B1", "B1"))
DF |> count_graphs()
#> # A tibble: 2 × 3
#>   n1      n2        n
#>   <chr>   <chr> <int>
#> 1 Sample2 B1        2
#> 2 Sample1 A1        1