Skip to Content

read.px {pxR}

Reads a PC-Axis file
Package: 
pxR
Version: 
0.29

Description

This function reads a PC-AXIS file (a text file with certain format) and creates an object of the class px.

Usage

read.px(filename, encoding = "latin1", 
        na.strings = c('"."', '".."', '"..."', '"...."'))

Arguments

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 DATA field of the PC-AXIS file. The chapter 4 of the second reference provides details about the dot codes used in the PC-AXIS format.

Details

This function reads data files in the PC-Axis format. The format is described in he 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".

Values

An object of the class px, which is essentially a list comprising the fields of a PC-AXIS file (see references for details).

See Also

as.data.frame.px, as.array.px iconv

Examples

my.px.object <- read.px(system.file("extdata", "example.px",
                        package = "pxR") )
my.px.data   <-  as.data.frame( my.px.object )

Author(s)

Carlos J. Gil Bellosta, Oscar Perpian Lamigueiro, Francisco J. Viciana Fernndez

Documentation reproduced from package pxR, version 0.29. License: GPL-3