[R] Importing data from SPSS with Arabic encoding

Florent Bresson f_bresson at yahoo.fr
Wed Jan 7 10:15:47 CET 2009


Dear R-users,

I'm facing a problem with the import of data in R. I have a sav file that, I presume, uses some Arabic encoding (but I don't know which one) and I would like to read it with R. When I use the function read.spss (I also tried spss.get(Hmisc)), I get the following message:
> read.spss("Hhld.sav")
Erreur dans read.spss("Hhld.sav") :
  erreur à la lecture de l'entête du fichier système
De plus : Warning message:
In read.spss("Hhld.sav") :
  Hhld.sav : position 0 : le nom de la variable commence avec un caractère non autorisé

The second and last lines can be translated into "error reading system-file header" and "Hhld.sav: position 0: Variable name begins with invalid character". That's why I suppose it is a problem with the encoding. Does someone has an idea of the solution to my problem?

Thanks

Florent Bresson







More information about the R-help mailing list