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) ------ Harold C. Doran Director of Research and Evaluation New American Schools 675 N. Washington Street, Suite 220 Alexandria, Virginia 22314 703.647.1628 <http://www.edperform.net/> [[alternative HTML version deleted]]
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
The message is quite correct. See the rw-FAQ, Q2.14, or the FAQ Q7.10. On Mon, 23 Jun 2003, 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?The FAQs!> 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) -- 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