Skip to contents

filter the first two columns of graph dataframe

Usage

filter_graph(DF, query, invert = FALSE)

Arguments

DF

Dataframe with at least two columns

query

the term to be filtered

invert

if TRUE, invert the filter. Default FALSE.

Examples

graph <- data.frame(n1 = c("A", "B", "C"), n2 = c("B", "C", "D"))
filter_graph(graph, "B")
#>   n1 n2
#> 1  A  B
#> 2  B  C
filter_graph(graph, "B", invert = TRUE)
#>   n1 n2
#> 1  C  D