Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

set.sylly.env

A function to set information on your sylly environment


Description

The function set.sylly.env can be called before any of the hyphenation functions. It writes information on your current session's settings to your global .Options.

Usage

set.sylly.env(..., validate = TRUE)

Arguments

...

Named parameters to set in the sylly environment. Valid arguments are:

lang

A character string specifying a valid language.

hyph.cache.file

A character string specifying a path to a file to use for storing already hyphenated data, used by hyphen.

hyph.max.token.length

A single number to set the internal cache size for tokens. The value should be set to the longest token to be hyphenated.

To explicitly unset a value again, set it to an empty character string (e.g., lang="").

validate

Logical, if TRUE given paths will be checked for actual availablity, and the function will fail if files can't be found. This option is currently without any effect, as it does not apply to hyph.cache.file because that file will be created automatically if needed.

Details

To get the current settings, the function get.sylly.env should be used. For the most part, set.sylly.env is a convenient wrapper for options. To permanently set some defaults, you could also add respective options calls to an .Rprofile file.

Value

Returns an invisible NULL.

See Also

Examples

set.sylly.env(hyph.cache.file=file.path(tempdir(), "cache_file.RData"))
get.sylly.env(hyph.cache.file=TRUE)

## Not run: 
# example for setting permanent default values in an .Rprofile file
options(
  sylly=list(
    hyph.cache.file=file.path(tempdir(), "cache_file.RData"),
    lang="de"
  )
)
# be aware that setting a permamnent default language without loading
# the respective language support package might trigger errors

## End(Not run)

sylly

Hyphenation and Syllable Counting for Text Analysis

v0.1-6
GPL (>= 3)
Authors
Meik Michalke [aut, cre]
Initial release
2020-09-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.