px_languages.px: LANGUAGES

View source: R/modify_languages.R

px_languagesR Documentation

LANGUAGES

Description

Inspect or change LANGUAGES.

Usage

px_languages(x, value, validate)

## S3 method for class 'px'
px_languages(x, value, validate = TRUE)

Arguments

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 px_validate() to manually preform the check.

Details

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.

Value

A px object

See Also

px_language

Examples

# 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)


pxmake documentation built on April 11, 2025, 6:06 p.m.