Re: [R] Importing data

From: Prof Brian Ripley <>
Date: Sun, 6 Jan 2008 16:55:03 +0000 (GMT)

On Sun, 6 Jan 2008, Rense Nieuwenhuis wrote:

> Hi,
> you might try to use the foreign-package, which contains the function
> read.spss. This works fine most of the time,
> For a description of its usage, see the help-files or my own website:
> into-r-2/
> Remember, you'll need to install the foreign-package first.

You shouldn't have to: it is supposed to come with every installation of R, and be installed unless you specifically opt out.

Perhaps you meant 'first load the foreign package via library(foreign)'?

[Re: Frank Harrell's comment, many people use .por for SPSS export files; that is the extension used in package foreign's tests directory. But the issue may well be that xxx.por is not an SPSS export file.]

> Hope this helps,
> Rense Nieuwenhuis
> On Jan 6, 2008, at 12:46 , Simo Vundla wrote:
>> Hi,
>> I'm trying to import categorical data from SPSS to R using the script:
>> xxx <-spss.get("xxx.por", use.value.labels=TRUE) but unfortunately
>> am getting an error message 'error reading portable-file dictionary'.
>> I have successfully imported data in the past.

>> What could be the problem with this data?
>> Thanks
>> Simo

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 06 Jan 2008 - 17:00:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 06 Jan 2008 - 17:30:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive