[R] Help with data.frame and lapply

Juan Daniel López Serna juanda.lopez at iic.uam.es
Fri Dec 16 09:33:22 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello:
	I'm having problems with this line of code:

X.lm <- lapply(names(d), function(x) lm(d["cls"] ~ d[x], data=d))

	d[x] is what is giving trouble here, but I don't know exactly how to
solve it. What I'm trying to do is to create a linear model from each
column of the data frame 'd' to apply ANOVA later.
	Thanks very much in advance. Regards:


Juan Daniel López Serna

- ----
Instituto de Ingeniería del Conocimiento
(http://www.iic.uam.es)
Universidad Autónoma de Madrid
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFDonvRXHsVbn2qIYMRAqi8AJ0X6zOAevAGzMczQ+ahHlVJnUK4ZQCeIDi6
PPB3baK8JNOa3eoIgbmVCdM=
=WKlt
-----END PGP SIGNATURE-----




More information about the R-help mailing list