compare_mentions() lets you group mentions together using sub-filters when counting them using count_mentions(). This is part of the query() language.

compare_mentions(.account, ...)

compare_mentions_raw(.account, comparisons)

Arguments

.account

An account or query() object.

...

A named set of sub-filters, such as positive = sentiment = 1. See the examples.

comparisons

A named list of comparison subfilters.

Value

A query() object.

Details

compare_mentions_raw() allows you to construct a list of comparison filters programmatically, and apply them to the query.

See also

Other verbs for the query language: group_mentions_by(), filter_mentions(), with_mention_fields(), with_mention_order(), with_account().

query() is a way to manually create queries.

Examples

account("TEST01AA") %>% compare_mentions(enterprise = "media is enterprise", consumer = "media is consumer")
#> BrandsEye Query #> accounts: TEST01AA #> brands: TEST01AA:1[Your Brand Here], TEST01AA:2[Sibling Brand] #> timezones: Africa/Johannesburg #> comparison: media is enterprise, media is consumer
account("TEST01AA") %>% compare_mentions_raw(list(enterprise = "media is ENTERPRISE", consumer = "media is CONSUMER"))
#> BrandsEye Query #> accounts: TEST01AA #> brands: TEST01AA:1[Your Brand Here], TEST01AA:2[Sibling Brand] #> timezones: Africa/Johannesburg #> comparison: media is ENTERPRISE, media is CONSUMER