Counts how many records match a query in each year, giving the size of a
literature over time. It is the single-query companion to
scopus_compare_topics(): where the comparison shows topics as a share of a
reference, this shows the absolute count.
Usage
scopus_trend(
query,
years,
field = NULL,
view = c("STANDARD", "COMPLETE"),
api_key = NULL,
inst_token = NULL,
verbose = FALSE
)Arguments
- query
Character scalar. The base search expression.
- years
Integer vector of publication years to count over, for example
2010:2020.- field
Optional 'Scopus' field tag to wrap the query in (see
scopus_plan()).- view
Either
"STANDARD"or"COMPLETE".- api_key, inst_token
Optional credentials, resolved by default from options or environment variables (see
scopus_has_key()).- verbose
Logical. When
TRUE, progress is reported.
Value
A tibble of class scopus_trend with columns query (the
field-wrapped query), year (integer) and n (the count that year, as a
double so very large counts are exact). A year whose response omits a total
is recorded as NA (with a warning) and contributes nothing to the total
shown by print().
API access
This performs one count request per year, so it requires a valid API key and
internet access; see the API access section of scopus_count().
