[R] How to generate a new column according to some rule?

minben minbenh at gmail.com
Mon Mar 30 05:17:35 CEST 2009


In a data frame I have a column "date" and a column "time",now I want
to generate a new column which is the mean of the value of time group
by date. In stata the command is

egen scalls = mean(time),by(date)

but I don't know the command in R, can anybody help me?




More information about the R-help mailing list