Counts mentions, aggregating them in to various data sets.
See the query()
language to conveniently specify what to count.
count_mentions(.account, ...) # S3 method for brandseyer2.account.v4 count_mentions( .account, filter, ..., groupBy = NULL, select = NULL, orderBy = NULL, tagNamespace = NULL, .envir = parent.frame() ) # S3 method for character count_mentions( .account, filter, ..., timezone = "Africa/Johannesburg", groupBy = NULL, select = NULL, orderBy = NULL, tagNamespace = NULL ) # S3 method for brandseyer2.query count_mentions( .account, ..., tagNamespace = NULL, .show.progress = interactive() )
.account | An account to read from |
---|---|
... | Further arguments for other methods |
filter | A filter to use |
groupBy | An optional list of names of things to group by.
For example, |
select | An optional list of names of things to select and
aggregate by, in addition to the number of mentions.
For example, |
orderBy | An optional list of names of the aggregate fields to order the results by. |
tagNamespace | An optional string. When grouping by |
.envir | An optional environment in which to evaluate variables in
your |
timezone | A character vector indicating the timezone that dates are reported in. This should usually be the account's timezone. |
.show.progress | A logical value to indicate whether to show a progress bar or not. Defaults to showing the progress bar in interactive settings. In addition, the progress bar will only be shown when counting mentions for more than three accounts at a time. |
A tibble of data.
brandseyer2.account.v4
: Count mentions in a v4 account.
character
: Allows you to fetch mentions using raw fields. All fields are dynamically
created (such as groupBy) are, in this version of the function, character
vectors.
brandseyer2.query
: Count mentions using a query()
.
if (FALSE) { # Count all mentions in your account in the last year account("TEST01AA") %>% count_mentions("published inthelast year and brandisorchildof 1") # Count all mentions in your account, grouping by publication date. account("TEST01AA") %>% count_mentions("published inthelast year and brandisorchildof 1", groupBy = published) } if (FALSE) { count_mentions("TEST01AA", "published inthelast week", groupBy = c("published")) } if (FALSE) { account("TEST01AA", "TEST02AA") %>% filter_mentions("published inthelast week") %>% group_mentions_by(published) %>% count_mentions() }