SCM

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: read.px does not read some files [ Reply ]
By: Hans Baumgartner on 2012-01-27 10:27
[forum:5489]
http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0123.px

After every DATA= line there should be a space:
602 27 34 31 42 31 46 46 37 38 52 40 34 31 25 28 30 10 20<space>

End of DATA= should be:
602 27 34 31 42 31 46 46 37 38 52 40 34 31 25 28 30 10 20;
not
602 27 34 31 42 31 46 46 37 38 52 40 34 31 25 28 30 10 20
;


http://www.ine.es/pcaxisdl//t30/p168/serie/l0/01001.px

In DATA i would use only <space> as separator
nota a mix of <space> and ;

end of data line should be space in the entire DATA= section


http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0312.px

Please try our free PX-Edit:
http://tilastokeskus.fi/tup/pcaxis/lataus_tyokalut_en.html

It now runs in wine ... we just tried it!

It fixes all problems in PC-Axis (.px) files
and gives you good erroreports.

It automatically fixes bad DATA= parts and
also checks if amount of datacells match metadata.

This is a tool we use in production and is installed on thousands of workstations
in statistical offices around the world.

It also supports the multilingual format of PC-Axis (.px)

Validate your files with PX-Edit!!

Please give us feedback
hans.baumgartner@stat.fi

RE: read.px does not read some files [ Reply ]
By: Carlos Gil Bellosta on 2011-12-28 16:18
[forum:5370]
I have tried to load these files from Windows (XP) using R 2.14.1 and version 2.7 of pxR and

kk <- read.px( url("http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0123.px" ) )

kk <- read.px( url("http://www.ine.es/pcaxisdl//t30/p168/serie/l0/01001.px " ) )

kk <- read.px( url("http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0312.px" ) )

all worked. I am under the impression that the user saved the files into disk and the encoding, somehow, got the encodings all messed up.

Best regards,

Carlos J. Gil Bellosta
http://www.datanalytics.com

read.px does not read some files [ Reply ]
By: Oscar Perpiñán Lamigueiro on 2011-12-28 14:56
[forum:5369]
Hi,

I have received some messages about problems when reading
some files with read.px (https://stat.ethz.ch/pipermail/r-help-es/2011-December/003093.html). Initially the user was using pxR 0.24. After changing to 0.26 some problems persist with:

http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0123.px
http://www.ine.es/pcaxisdl//t30/p168/serie/l0/01001.px
http://www.ine.es/pcaxisdl//t20/e245/p07/a2010/l0/0312.px

I have been able to read them without problems with R at GNU/Linux. The user is using Windows XP Sp3 so I think the problem is related to the way windows manages the encoding of the files.

Oscar.

Thanks to:
Vienna University of Economics and Business Powered By FusionForge