View source: R/readtext_options.R
readtext_options | R Documentation |
Get or set global options affecting functions across readtext.
readtext_options(..., reset = FALSE, initialize = FALSE)
... |
options to be set, as key-value pair, same as
|
reset |
logical; if |
initialize |
logical; if |
Currently available options are:
verbosity
Default
verbosity for messages produced when reading files. See
readtext()
.
When called using a key = value
pair (where key
can be
a label or quoted character name)), the option is set and TRUE
is
returned invisibly.
When called with no arguments, a named list of the package options is returned.
When called with reset = TRUE
as an argument, all arguments are
options are reset to their default values, and TRUE
is returned
invisibly.
## Not run:
# save the current options
(opt <- readtext_options())
# set higher verbosity
readtext_options(verbosity = 3)
# read something in here
if (!interactive()) pkgload::load_all()
DATA_DIR <- system.file("extdata/", package = "readtext")
readtext(paste0(DATA_DIR, "/txt/UDHR/*"))
# reset to saved options
readtext_options(opt)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.