Hi,
thanks for all suggestions - I found a solution myself within 5 minutes, 
but your suggestions are surely more elegant / shorter.

Thanks again,
Hilmar



hadley wickham schrieb:
> Hi Hilmar,
> 
> What was wrong with my solution?  It's much simpler and shorter.
> 
> cat <- sapply(df, is.factor)
> df[cat] <- lapply(df[cat], factor)
> 
> Hadley
> 
> On 6/5/07, Hilmar Berger <[EMAIL PROTECTED]> wrote:
> 

> 


-- 

Hilmar Berger
Studienkoordinator
Institut für medizinische Informatik, Statistik und Epidemiologie
Universität Leipzig
Härtelstr. 16-18
D-04107 Leipzig

Tel. +49 341 97 16 101
Fax. +49 341 97 16 109
email: [EMAIL PROTECTED]

______________________________________________
[email protected] 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.

Reply via email to