Hi,
    I'm writing a function f()  which includes probability density function 
computation,  I would like to make this generic, that is , I will specify  the 
density when I call f(),   here's what I wrote:  do.call(den, args=list(d, 
arg)) 
    the question is , say, if I let den=dnorm, I have to replace arg with  
mean=??, sd=??, etc.  but I tried arg=c(mean=..,sd=..)
and arg="mean=..,sd=..",  neither of these worked.   What is the right way to 
do this ?

Thanks a lot

tong

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to