to_mention_filter() and to_count_filter() converts a query() to a vector of filters appropriate for either counting or fetching mentions. An account code is specified to choose a filter for a specific account. Each filter is required to perform all of the count operations or to fetch all of the queried data.

to_mention_filter(query, code)

Arguments

query

A query() object.

code

The account we want filters for.

Value

A vector of characters. Returns NULL if there are no brands.

See also

Other query conversion functions: to_count_filter()

Examples

account("TEST01AA") %>% filter_mentions("published inthelast week") %>% to_mention_filter("TEST01AA")
#> [1] "(published inthelast week) and (brand isorchildof 1)" #> [2] "(published inthelast week) and (brand isorchildof 2)"