[R] Help. Import data
Fredrik Karlsson
fredrik.karlsson at ling.umu.se
Fri Jul 4 09:05:01 CEST 2003
Hi Silika,
This is what I would do:
>df <- read.spss("datafile", to.data.frame=T)
>for(i in c("age","income")){ #Add more if you like
+ df[[i]] <- as.numeric(df[[i]])
+}
/Fredrik
On Fri, Jul 04, 2003 at 08:39:07AM +0200, Silika Tereshchenko wrote:
> Hoy,
>
>
> I have the following problem. I have to import the dataset (survey) from SPSS
> into R-programm. By using the "read.spss" the all of variables have been readed
> as factor. I need the variables "income" and "age" as numeric for the
> regreesion analysis. Could you plese help me.
>
>
> Thanks a lot,
> best regards,
> Silika
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list