I have never used that function, but I know that with read.csv() you can do the following to select only the columns you want:
chosen_vars <- read.csv("Workbook1.csv", header=T)[c("variable1", "variable3")] HTH sassorauk wrote: > > Is it possible to import only certain variables from a SPSS file. > > I know that read.spss in the foreign library will bring the data into R > but can I choose to important only chosen variables from the SPSS dataset > to R? > > Thanks for your help. > > R > -- View this message in context: http://r.789695.n4.nabble.com/Data-import-tp3842196p3842600.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.