PC-Axis with R: pxR

(This article was first published on Omnia sunt Communia! » R-english, and kindly contributed to R-bloggers)

PC-Axis is a software family consisting of a number of programs for the Windows and Internet environment used to present statistical information. It is used by national and international institutions to publish statistical data. Programs in the PC-Axis family use a particular data file format (see the full PX-Axis data format description). Now the pxR package is available at CRAN: it provides a set of functions for reading and writing PC-Axis files. This will facilitate the analysis of statistical data to the R community.

The function read.px reads a PC-Axis file from a given location and returns an object of the class px containing all the data and metadata in the PC-Axis file. The single most important piece of infomation with a px object is the data matrix, which can be extracted with function as.data.frame.

For instance,

my.px.object <- read.px("/path/to/pc-axis/file")
my.px.data   <-  as.data.frame(my.px.object)

will create the data.frame my.px.data with the data in the corresponding PC-Axis file.

To leave a comment for the author, please follow the link and comment on their blog: Omnia sunt Communia! » R-english.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)