px_notex | R Documentation |
Inspect or change NOTEX.
px_notex(x, value, validate)
## S3 method for class 'px'
px_notex(x, value, validate = TRUE)
x |
A px object |
value |
Optional. A character string, a data frame, or a list.
|
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 |
NOTEX has a lot of possible ways to specify value
, because
it can be set both for the entire PX-file and for individual variables.
A px object, a character string, a data frame, or a list of character strings and/or data frames.
Statistics Sweden's documentation
library(tibble)
# Set NOTEX for entire PX-file
x1 <-
px(population_gl) |>
px_notex('Note about PX-file')
# Print NOTEX
px_notex(x1)
# Set NOTEX for entire PX-file in multiple languages
x2 <-
x1 |>
px_languages(c('en', 'kl')) |>
px_notex(tribble(~language, ~value,
'en', 'English notex',
'kl', 'Kalaallisut notex'
)
)
px_notex(x2)
# Set NOTEX for variables
x3 <-
x1 |>
px_notex(tribble(~`variable-code`, ~notex,
'year', 'Some data collected in following year',
'age', 'Is rounded down'
)
)
px_notex(x3)
# Remove all NOTEXs
x4 <- px_notex(x3, NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.