read.px | R Documentation |
This function reads a PC-AXIS file (a text file with certain format) and creates an object of the class px.
read.px(filename, encoding = NULL, na.strings = c('"."', '".."', '"..."', '"...."', '"....."', '"......"', '":"'))
filename |
The name of the PC-Axis file to read |
encoding |
A character string describing the current encoding; see the Details section |
na.strings |
A character to be interpreted as missing value in
the |
This function reads data files in the PC-Axis format. The format is described in the two documents in the reference section.
According to them, null values can be encoded using ".", "..", "...", or "....".
Also, the documentation is not very specific concerning the actual encoding to be expected in
PC-Axis files.
It is however quite safe to assume that they will be encoded using some "latin1" variant.
The alternative value for the encoding
argument would be "utf-8".
An object of the class px
, which is essentially a list comprising the
fields of a PC-AXIS file (see references for details).
Carlos J. Gil Bellosta, Oscar Perpiñan Lamigueiro, Francisco J. Viciana Fernández
https://www.scb.se/globalassets/vara-tjanster/px-programmen/px-file_format_specification_2013.pdf https://tilastokeskus.fi/tup/pcaxis/tiedostomuoto2006_laaja_en.pdf
as.data.frame.px
,
as.array.px
iconv
my.px.object <- read.px(system.file("extdata", "example.px", package = "pxR") ) my.px.data <- as.data.frame( my.px.object )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.