Hello! I'm not sure if this is an german list, so I will post in english. I'm using R on my gentoo linux and now I got an spss .sav file. I found that r has a function like read.spss("file.sav") but when I try this I get the Error: couldn't find function "read.spss". Can anyone tell me what's going wrong? Thanks for your help, Martin
Hi Martin, Martin Klaffenboeck wrote:> Hello! > > I'm not sure if this is an german list, so I will post in english.It's an English list.> I'm using R on my gentoo linux and now I got an spss .sav file. I found > that r has a function like read.spss("file.sav") but when I try this I > get the Error: couldn't find function "read.spss". Can anyone tell me > what's going wrong?It's in the package "foreign". Try: library(foreign) HTH, Kevin -- Ko-Kang Kevin Wang PhD Student Centre for Mathematics and its Applications Building 27, Room 1004 Mathematical Sciences Institute (MSI) Australian National University Canberra, ACT 0200 Australia Homepage: http://wwwmaths.anu.edu.au/~wangk/ Ph (W): +61-2-6125-2431 Ph (H): +61-2-6125-7407 Ph (M): +61-40-451-8301
On Sat, 2005-05-28 at 13:23 +0000, Martin Klaffenboeck wrote:> Hello! > > I'm not sure if this is an german list, so I will post in english.The official language is English.> I'm using R on my gentoo linux and now I got an spss .sav file. I found > that r has a function like read.spss("file.sav") but when I try this I > get the Error: couldn't find function "read.spss". Can anyone tell me > what's going wrong?read.spss() is part of the "foreign" package, which is installed as part of the base R installation, but it is not loaded by default. Thus, you need to use: library(foreign) read.spss(...) See ?library and page 74 in "An Introduction to R". HTH, Marc Schwartz
Martin, If you have trouble finding page 74 of Introduction to R, you can get the information that Marc suggested you read by doing the following. At the R prompt enter help.start() Then when you see the web page "Statistical Data Analysis R", click on the SEARCH ENGINE & KEYWORDS link. In the search box enter SPSS. John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics Baltimore VA Medical Center GRECC and University of Maryland School of Medicine Claude Pepper OAIC University of Maryland School of Medicine Division of Gerontology Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 410-605-7119 - NOTE NEW EMAIL ADDRESS: jsorkin@grecc.umaryland.edu>>> Marc Schwartz <MSchwartz@mn.rr.com> 5/28/2005 9:35:52 AM >>>On Sat, 2005-05-28 at 13:23 +0000, Martin Klaffenboeck wrote:> Hello! > > I'm not sure if this is an german list, so I will post in english.The official language is English.> I'm using R on my gentoo linux and now I got an spss .sav file. Ifound> that r has a function like read.spss("file.sav") but when I try thisI> get the Error: couldn't find function "read.spss". Can anyone tellme> what's going wrong?read.spss() is part of the "foreign" package, which is installed as part of the base R installation, but it is not loaded by default. Thus, you need to use: library(foreign) read.spss(...) See ?library and page 74 in "An Introduction to R". HTH, Marc Schwartz ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html [[alternative HTML version deleted]]