Description Usage Arguments Value Methods (by class) Examples
View source: R/mentions_count.R
Counts mentions, aggregating them in to various data sets.
See the query()
language to conveniently specify what to count.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | count_mentions(.account, ...)
## S3 method for class 'brandseyer2.account.v4'
count_mentions(
.account,
filter,
...,
groupBy = NULL,
select = NULL,
orderBy = NULL,
tagNamespace = NULL,
.envir = parent.frame()
)
## S3 method for class 'character'
count_mentions(
.account,
filter,
...,
timezone = "Africa/Johannesburg",
groupBy = NULL,
select = NULL,
orderBy = NULL,
tagNamespace = NULL
)
## S3 method for class '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()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
# 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)
## End(Not run)
## Not run:
count_mentions("TEST01AA", "published inthelast week", groupBy = c("published"))
## End(Not run)
## Not run:
account("TEST01AA", "TEST02AA") %>%
filter_mentions("published inthelast week") %>%
group_mentions_by(published) %>%
count_mentions()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.