to_count_filter() and to_mention_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_count_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_mention_filter()

Examples

account("TEST01AA") %>% filter_mentions("published inthelast week") %>% to_count_filter("TEST01AA")
#> (published inthelast week) and (brand isorchildof 1 or brand isorchildof 2)