px_stub {pxmake} | R Documentation |
STUB
Description
Inspect or change STUB.
Usage
px_stub(x, value, validate)
## S3 method for class 'px'
px_stub(x, value, validate = TRUE)
Arguments
x |
A px object |
value |
Optional. A character vector of variable names to change to
STUB. This also changes the STUB order. With names in |
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 |
Value
A px object or a character vector.
See Also
Statistics Sweden's documentation
Examples
x1 <- px(population_gl)
# Print STUB
px_stub(x1)
# Add 'year' to STUB
x2 <- px_stub(x1, 'year')
px_stub(x2)
# Change order of STUB
x3 <- px_stub(x2, c('age', 'gender'))
px_stub(x3)
[Package pxmake version 0.18.0 Index]