Skip to contents

Checks potential errors, translates the parameters, set parameters for the API call.

Usage

prepare_param(
  keyword,
  corpus,
  from,
  to,
  resolution = "yearly",
  n_of_level = "grams",
  subcorpora = NULL
)

Arguments

keyword

A character string specifying the keyword for analysis.

corpus

A character string specifying the code of the corpus.

from

An integer or "earliest" representing the starting year for the analysis.

to

An integer or "latest" representing the ending year for the analysis.

resolution

A character string specifying the desired resolution for the analysis (e.g., "daily", "monthly", "yearly").

n_of_level

A character string specifying the type of object to compute the number of occurrences for or the level at which to compute co-occurrences.

subcorpora

A character vector specifying the codes of the subcorpora.

Value

A list. Contains cleaned function parameters (`keyword`, `corpus`, `from`, `to`, `resolution` and `subcorpora`).