[R] how to loop through variables in R?

jas4710 watashi at post.com
Mon Nov 22 09:11:17 CET 2010

After importing a table with "M" variables and "N" records, I'd like to
calculate chi-square statistics, say, between N1, N2; N1, N3, ..., N1, Ni,
and then N2, N3, ... N2, Ni, ..., Ni-1, Ni.  Two loops should be ok but the
manual & online help don't show a systematic way to do so but instead show
hard-code examples so users have to type in the names themselves one by

View this message in context: http://r.789695.n4.nabble.com/how-to-loop-through-variables-in-R-tp3053214p3053214.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list