[R] Now another question regarding the Foreign package

Jonathan Baron baron at psych.upenn.edu
Thu May 11 21:50:13 CEST 2006


On 05/11/06 15:42, David Kaplan wrote:
> Hi,
> 
> Because I'm new to R and trying to move off of SPSS, I have another question.  I
> downloaded the "Foreign" package which I understand reads in various datasets from
> programs such as SPSS and SAS.  There isn't much documentation that I can find
> regarding the specifics of this in the online docs, but I assume that it is like

Look in the help files for the package.

> read.table.  So, here is what I wrote and here is what I got.
> 
>  bw2 <- read.spss("c:\birthwt.sav")
> Error: couldn't find function "read.spss"
> 
> Any thoughts?

You need to install the package, not just download it.

Then you need to load it into your R session:
library("foreign")

Did you do that?

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page: http://www.sas.upenn.edu/~baron




More information about the R-help mailing list