Importing data from SCB into R

Statistics Sweden offer their data in the following four file formats:

Choose the first alternative: "PC-Axis fil". In order to access the data with R, install the pxR-package.

install.packages("pxR")

To get a data frame with data from a PC-Axis file named "BE0101N1.px", use:

my.px.obj <- read.px("BE0101N1.px")
my.data <- as.data.frame(my.px.obj)

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: oktober 12, 2017