Many thanks to you both, José -----Original Message----- From: Peter Dalgaard [mailto:[EMAIL PROTECTED] Sent: 18 July 2008 18:19 To: Jose Iparraguirre D'Elia Cc: Prof Brian Ripley; r-help@r-project.org Subject: Re: [R] Reading SPSS .por files
Jose Iparraguirre D'Elia wrote: > [snip] > >> Thanks Brian, >> >> The error message reads as follows: >> >> Error in read.spss("G:/Jose/Life and Times Survey/LT 2007/nilt07w1.por") : >> error reading portable-file dictionary >> > > So it looks like it is not a portable file, or at least one that read.spss > knows about Actually, no. I noticed that it had "8bit ascii" characters inside so on a hunch I sent it through iconv and got a different error message > read.spss("xxx.por", use.value.labels=FALSE) Error in read.spss("xxx.por", use.value.labels = FALSE) : file 'xxx.por' is not in any supported SPSS format So read.spss() recognizes the format of the original file alright, it's just that something in the file does not match the format that read.spss() expects. It reads at least one .por file, namely the one that ships with the source for the foreign package in the tests directory (pbc.por). It is not unlikely that it can be confused by character set encodings and CR/LF inside value labels, though. -- O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.