quanteda_options.RdGet or set global options affecting functions across quanteda.
quanteda_options(..., reset = FALSE, initialize = FALSE)
| ... | options to be set, as key-value pair, same as
|
|---|---|
| reset | logical; if |
| initialize | logical; if |
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.
Currently available options are:
verboselogical; if TRUE then use this as the default
for all functions with a verbose argument
threadsinteger; specifies the number of threads to use in parallelized functions
print_dfm_max_ndocinteger; specifies the number of documents to display when using the defaults for printing a dfm
print_dfm_max_nfeatinteger; specifies the number of features to display when using the defaults for printing a dfm
base_docnamecharacter; stem name for documents that are unnamed when a corpus, tokens, or dfm are created or when a dfm is converted from another object
base_featnamecharacter; stem name for features that are unnamed when they are added, for whatever reason, to a dfm through an operation that adds features
base_compnamecharacter; stem name for components that are created by matrix factorization
language_stemmercharacter; language option for char_wordstem, tokens_wordstem, and dfm_wordstem
(opt <- quanteda_options())#> $threads #> [1] 2 #> #> $verbose #> [1] FALSE #> #> $print_dfm_max_ndoc #> [1] 20 #> #> $print_dfm_max_nfeat #> [1] 20 #> #> $base_docname #> [1] "text" #> #> $base_featname #> [1] "feat" #> #> $base_compname #> [1] "comp" #> #> $language_stemmer #> [1] "english" #>quanteda_options(verbose = TRUE) quanteda_options("verbose" = FALSE) quanteda_options("threads")#> [1] 2quanteda_options(print_dfm_max_ndoc = 50L) # reset to defaults quanteda_options(reset = TRUE) # reset to saved options quanteda_options(opt)