View source: R/modify_languages.R
px_languages | R Documentation |
Inspect or change LANGUAGES.
px_languages(x, value, validate)
## S3 method for class 'px'
px_languages(x, value, validate = TRUE)
x |
A px object |
value |
Optional. A character vector. If missing, the current LANGUAGES are returned. If NULL, LANGUAGES are removed. |
validate |
Optional. If TRUE a number of validation checks are performed on the px object, and an error is thrown if the object is not valid. If FALSE, the checks are skipped, which can be usefull for large px objects where the check can be time consuming. Use |
If LANGUAGE is defined it should be one of the values in LANGUAGES.
If LANGUAGE is set, it is considered the main language. If LANGUAGE is not set, the first language in LANGUAGES is considered the main language.
A px object
px_language
# Set LANGUAGES to 'en' and 'kl', with 'en' as main language
x1 <-
population_gl |>
px() |>
px_languages(c('en', 'kl'))
# Print LANGUAGES
px_languages(x1)
# Remove LANGUAGES
x2 <- px_languages(x1, NULL)
px_languages(x2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.