# Set PRECISION for a variable
library(tibble)
x1 <-
population_gl |>
px() |>
px_precision(tribble(~`variable-code`, ~precision,
'gender', 2))
# Print PRECISION
px_precision(x1)
# Set PRECISION for a value
x2 <-
x1 |>
px_precision(tribble(~`variable-code`, ~code, ~precision,
'age', '2004', 3))
px_precision(x2)
# Remove PRECISION
x3 <- px_precision(x2, NULL)
px_precision(x3)
Run the code above in your browser using DataLab