[R] Data import

B77S bps0002 at auburn.edu
Mon Sep 26 05:04:07 CEST 2011

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",


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.

More information about the R-help mailing list