[R] Importing data
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun Jan 6 17:55:03 CET 2008
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:
> http://www.rensenieuwenhuis.nl/r-project/manual/basics/getting-data-
> 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, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list