Skip to content
Back to formatted view

Raw Message

Message-ID: <1056386122.4195.3.camel@localhost>
Date: 2003-06-23T16:35:35Z
From: Marc Schwartz
Subject: read.spss
In-Reply-To: <66578BFC0BA55348B5907A0F798EE93029E7CD@ernesto.NASDC.ORG>

On Mon, 2003-06-23 at 11:15, Harold Doran wrote:
> I have loaded the foreign package and am still having problems with an
> import. I get a message that reads, unable to open file. Whe I try
> different files I get the same message. Here is the code I used. Am I
> missing something?
>  
> I am using 1.7 and have also tried this in 1.6 with the same problem.
>  
> hsb<-read.spss("C:\HLM504_Student\Examples\AppendxA\HSB1.SAV",
> use.value.labels=TRUE, to.data.frame=FALSE, max.value.labels=Inf)
>  


Running under Windows, you need to "escape" the backslashes, so you need
to use double backslashes:

hsb<-read.spss("C:\\HLM504_Student\\Examples\\AppendxA\\HSB1.SAV",
use.value.labels = TRUE, to.data.frame = FALSE, max.value.labels = Inf)

This is in the Windows FAQ 2.14.

HTH,

Marc Schwartz