[R] Passing function to tapply as a string

From: Yuri Volchik <yuri.volchik_at_gmail.com>
Date: Fri, 07 Mar 2008 03:06:35 -0800 (PST)


Was wondering if it is possible to pass function name as a parameter, smth along this line


dd<-function(dfd, param=param.to.pass,...){   ttime.int <- format(ttime,fmt)

     param[3] = tapply(dfd[,param[1]],ttime.int,param[3]),


I know there is a as.formula expression but not quite sure if there is some way to accomplish what i need.

View this message in context: http://www.nabble.com/Passing-function-to-tapply-as-a-string-tp15891151p15891151.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 07 Mar 2008 - 11:16:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 09 Mar 2008 - 06:30:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive