On Fri, 4 Jul 2003, Fredrik Karlsson wrote:
> 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]])
> +}
Please don't: that does not turn a factor into its numerical equivalent.
See the FAQ question I pointed Silika to (Q7.12 in the current version).
It ends
In any case, do not call `as.numeric()' or their likes directly.
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help