Hi, I would like to read a spss file in R. When i type read.spss("...") Comes the error: couldn't find function "read.spss" What shall i do? Margarida [[alternative HTML version deleted]]
Margarida J?lia Rodrigues Igreja wrote:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do?Doing help.search("read.spss") would tell you that it's in the foreign package. You need to do library(foreign) read.spss("...") -- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 452-1424 (M, W, F) fax: (917) 438-0894
Hello Margarida, Tuesday, March 4, 1997, 2:21:00 AM, you wrote:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do? > Margarida"read.spss()" does not exists in the plain R, it requires the correct package "foreign package" ... A simple solution would be to export the data from Spss to CSV format and then read something with scan() or read.table() functions But if not possible to export the foreign package is the right way to go. try ?scan or ?read.table parameters . Marco Marques INESC Porto
perhaps library(foreign) ?read.spss Ivar Herfindal On Tue, 04 Mar 1997 02:21:00 +0000, Margarida J?lia Rodrigues Igreja <migreja at med.up.pt> wrote:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do? > > Margarida > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting- > guide.html >
Margarida J?lia Rodrigues Igreja wrote:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do?It's in package "foreign", so use library(foreign) before calling read.spss(). Uwe Ligges> Margarida > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Margarida J?lia Rodrigues Igreja <migreja at med.up.pt> writes:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do?library(foreign) -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
r-help-bounces at stat.math.ethz.ch wrote on 04/03/1997 03:21:00:> Hi, > I would like to read a spss file in R. > When i type read.spss("...") > Comes the error: couldn't find function "read.spss" > What shall i do? >Hi Margarida, Did you load the foreign package by typing library(foreign) before using the read.spss()-command and did you install the foreign package by typing e.g. install.packages(foreign) before loading the foreign package ? HTH, Tobias