get_reference_words {dhlabR}R Documentation

Retrieve Reference Words Count and Relative Frequency

Description

This function obtains the count and relative frequency of a vector of words within a year range for specified document types.

Usage

get_reference_words(
  doctype = "digibok",
  from_year = 1990,
  to_year = 2000,
  words = NULL
)

Arguments

doctype

A character string indicating the document type. One of "digibok", "digavis", or "digitidsskrift".

from_year

A numeric value indicating the starting year of the range.

to_year

A numeric value indicating the ending year of the range.

words

A vector of words for which the count and relative frequency will be retrieved.

Value

A list containing the count and relative frequency of the specified words within the given year range and document type.

Examples

doctype <- "digibok"
from_year <- 1900
to_year <- 2000
words <- c("og", "eller", "men")
result <- get_reference_words(doctype, from_year, to_year, words)

[Package dhlabR version 1.0.2 Index]