Skip to content
Prev 199710 / 398502 Next

Complicated For Loop (to me)

Hi

You probably may use some of aggregate functions (by, tapply, aggregate)

aggregate(some.columns.of.data frame, list(SLUNCH, ETHNIC, RACE, 
DIVISION), function(x) x/sum(x))

Untested on your data.

Regards
Petr


r-help-bounces at r-project.org napsal dne 10.11.2009 03:51:55:
my
all
did
that
doesn't
using
sep=""),
same
variables
that
knowledge
powerful
returned to
put
http://old.nabble.com/Complicated-For-Loop-%28to-me%29-tp26269479p26272994.html
http://old.nabble.com/Complicated-For-Loop-%
http://www.R-project.org/posting-guide.html