frequencyQuery,KorAPConnection-method {RKorAPClient} | R Documentation |
Query frequencies of search expressions in virtual corpora
Description
frequencyQuery
combines corpusQuery()
, corpusStats()
and
ci()
to compute a tibble with the absolute and relative frequencies and
confidence intervals of one ore multiple search terms across one or multiple
virtual corpora.
Usage
## S4 method for signature 'KorAPConnection'
frequencyQuery(
kco,
query,
vc = "",
conf.level = 0.95,
as.alternatives = FALSE,
...
)
Arguments
kco |
|
query |
corpus query string(s.) (can be a vector). The query language depends on the |
vc |
virtual corpus definition(s) (can be a vector) |
conf.level |
confidence level of the returned confidence interval (passed through |
as.alternatives |
LOGICAL that specifies if the query terms should be treated as alternatives. If |
... |
further arguments passed to or from other methods (see |
Value
A tibble, with each row containing the following result columns for query and vc combinations:
-
query: the query string used for the frequency analysis.
-
totalResults: absolute frequency of query matches in the vc.
-
vc: virtual corpus used for the query.
-
webUIRequestUrl: URL of the corresponding web UI request with respect to query and vc.
-
total: total number of words in vc.
-
f: relative frequency of query matches in the vc.
-
conf.low: lower bound of the confidence interval for the relative frequency, given
conf.level
. -
conf.high: upper bound of the confidence interval for the relative frequency, given
conf.level
.
Examples
## Not run:
KorAPConnection(verbose = TRUE) |>
frequencyQuery(c("Mücke", "Schnake"), paste0("pubDate in ", 2000:2003))
## End(Not run)