as.array.px: Extraction of data from px objects into arrays

View source: R/as.array.px.R

as.array.pxR Documentation

Extraction of data from px objects into arrays

Description

This function extracts the data component from a px object as a array.

Usage

## S3 method for class 'px'
as.array(x, use.codes = FALSE, ...)

Arguments

x

A px object.

use.codes

A logical value to indicate whether to use CODES instead of VALUES as names of the levels: TRUE to use CODES, defaut FALSE. Or a vector with the names of the variables that use CODES to identify levels

...

Additional arguments. Not used yet.

Value

An array

Author(s)

Francisco J. Viciana

References

https://www.scb.se/globalassets/vara-tjanster/px-programmen/px-file_format_specification_2013.pdf

See Also

read.px, as.data.frame.px

Examples

my.px     <- read.px(system.file("extdata", "example.px", package = "pxR"))
my.array  <- as.array(my.px)
my.array2  <- as.array(my.px ,use.codes=TRUE)
my.array3  <- as.array(my.px ,use.codes=c('municipios'))

pxR documentation built on Nov. 23, 2022, 9:06 a.m.