use: Add corpora in R data packages to session registry.

Description Usage Arguments Details See Also Examples

View source: R/use.R

Description

Use CWB indexed corpora in R data packages by adding registry file to session registry.

Usage

1
use(pkg, lib.loc = .libPaths(), tmp = FALSE, verbose = TRUE)

Arguments

pkg

A package including at least one CWB indexed corpus.

lib.loc

A character vector with path names of R libraries.

tmp

Whether to use a temporary data directory.

verbose

Logical, whether to output status messages.

Details

pkg is expected to be an installed data package that includes CWB indexed corpora. The use-function will add the registry files describing the corpus (or the corpora) to the session registry directory and adjust the path pointing to the data in the package.

The registry files within the package are assumed to be in the subdirectory ./extdata/cwb/registry of the installed package. The data directories for corpora are assumed to be in a subdirectory named after the corpus (lower case) in the package subdirectory ./extdata/cwb/indexed_corpora/. When adding a corpus to the registry, templates for formatting fulltext output are reloaded.

If the path to the data directory in a package includes a non-ASCII character, binary data files of the corpora in package are copied to a subdirectory of the per-session temporary data directory.

See Also

To get the session registry directory, see registry; to reset the registry, see registry_reset.

Examples

1
2
use("polmineR")
corpus()

polmineR documentation built on Oct. 23, 2020, 8:31 p.m.