Internal function to check for errors in the parameters
error_param.Rd
This internal function checks for errors in the specified parameters, including the validity of the time range, the keyword, and the resolution, based on the provided information about the corpus.
Arguments
- info_corpus
A data frame containing information about the selected corpus.
- 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
This function does not return a value but may issue warnings or errors if any issues are found.
Details
This function performs the following checks:
Validity of Time Range:Ensures that the specified time range (
from
toto
) is numeric and valid.Validity of Keyword:Checks whether the specified
keyword
is a character string and not a character vector.Reliability of Corpus:Verifies that the specified time range falls within the reliable range of the given corpus.
Validity of Resolution:Ensures that the specified
resolution
is one of "daily", "monthly", or "yearly" and is compatible with the corpus's available resolutions.Validity of the subcorpora:Ensures that the specified subcorpora are valid.