[R] Passing arguments to a function within a function ...

2012-08-07 Thread christiaan pauw
Hallo Everybody How do you specify arguments for a function used within another function? Here is my problem: I am reconstructing a calculator for the burden of disease due to air pollution from publications and tools published by the WHO. The calculations make use of published dose-response

Re: [R] Passing arguments to a function within a function ...

2012-08-07 Thread Rui Barradas
Hello, Your problem seems simple, if I understand it correctly. Just add an extra argument to the caller function, drep(). drep - function(pop.conc = x, sicklist = adult.CP.mortality, par = cental estimate, ...) { # This extra argument dr.out = by(x, x$Name,

Re: [R] Passing arguments to a function within a function ...

2012-08-07 Thread christiaan pauw
Thanks Rui It works. On 7 August 2012 11:34, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, Your problem seems simple, if I understand it correctly. Just add an extra argument to the caller function, drep(). Christiaan Pauw Nova Institute www.nova.org.za

[R] Passing Arguments in a function

2011-02-15 Thread Michael Pearmain
Hi All, I'm having some trouble assigning arguments inside a function to produce a plot from a model Can anyone help me? Below I've outlined the situation and examples of failing and working code. Regards Mike ## data ## decay.data - ... behaviors lift reach.uu

Re: [R] Passing Arguments in a function

2011-02-15 Thread Ista Zahn
Hi Michael, On Tue, Feb 15, 2011 at 7:15 AM, Michael Pearmain michael.pearm...@gmail.com wrote: Hi All, I'm having some trouble assigning arguments inside a function to produce a plot from a model Can anyone help me? Below I've outlined the situation and examples of failing and working

[R] passing arguments to a function problem

2008-06-22 Thread Jiří Voller
Dear R-users, is there some way how to pass various colnames to the following code for sorting data.frames? mydf.ordered-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing = TRUE), ]) I was trying something like Afunction-function (mydf,colnames,decreasing=T){

Re: [R] passing arguments to a function problem

2008-06-22 Thread Gabor Grothendieck
See orderBy in the doBy package. On Sat, Jun 21, 2008 at 7:58 PM, Jiří Voller [EMAIL PROTECTED] wrote: Dear R-users, is there some way how to pass various colnames to the following code for sorting data.frames? mydf.ordered-with(mydf, mydf[order(colname1,colname2, colnameX, decreasing =