[RkWard-devel] SPSS test files

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Feb 1 18:40:24 UTC 2007


On Thursday 01 February 2007 18:28, you wrote:
> I have tested the mechanism with a greek sample file. If the headers are
> not greek (1.sav) the file is imported. If the headers are greek I take the
> following error message:
>
>  Error in read.spss("/home/user/Desktop/12.sav", to.data.frame = TRUE,  :
>     error reading system-file header
> In addition: Warning message:
> /home/user/Desktop/12.sav: position 0: Variable name begins with invalid
> character

This is deep inside the read.spss() C code. I'm afraid, there is nothing we 
can do about this from the RKWard side of affairs (the conversion mechanism I 
added simply converts all strings in the created R object, it can't access 
the lower levels of reading the file itself).

> I upload the 1.sav (with latin headers) and (with greek headers). To the
> enconding field you have to write windows-1253 or MS-GREEK.
>
> Can you reproduce this writing specific german letters on headers like ü?

I don't have access to SPSS at the moment (and won't for another few weeks). 
So I can't test. What do you mean by headers? The variable names? Variable 
labels? Something SPSS specific that I do not recall?
@Stefan, do you have access to SPSS? Could you give it a try?

How to proceed:
1) Make sure the SPSS file is valid and created in a standard way (I assume 
so).
2) Make sure you get the same bug, if you run in a plain R session.
3) Upload the test file to some web-server (we can put it under temp/ on 
RKWard, if you have no other good location).
4) Write a mail to r-help AT r-project.org detailing the steps to reproduce 
the problem in a plain R session (they don't let too many attachments 
through, so that's the reason for step 3)
5) Hope they'll either suggest a workaround or fix this.

I can't do this myself because I don't have access to SPSS, and I could not 
even tell, when all characters are read correctly vs. when they are messed up 
in the greek example you provided, so I could not answer back any questions.

> Can we have a drop-down list at the "other enconding" field having the
> encondings from iconvlist() ?

Not easily, no. The list will have to be static, and iconvlist() may differ 
across systems. Also this list has nearly 1000 entries on this machine! Of 
course we can add several more to the selection list (probably all 
ISO8859-[1..15], don't know, which other ones may be common).

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20070201/97d96348/attachment.sig>


More information about the Rkward-devel mailing list