Re: [R] Help with functions as arguments

2013-02-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/13 08:30, Ian Renner wrote: Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's a bit tricky to explain, so a simple example will have to suffice. I

Re: [R] Help with functions as arguments

2013-02-12 Thread Barry Rowlingson
On Tue, Feb 12, 2013 at 7:30 AM, Ian Renner ian_ren...@yahoo.com wrote: Where I am running into trouble is when I want to call function f1 within function f2: f2(x = 3, z = f1(x)) This returns the error: Error in f1(x) : object 'x' not found I'm not sure how to define environments

Re: [R] Help with functions as arguments

2013-02-12 Thread Jan T Kim
On Tue, Feb 12, 2013 at 09:38:19AM +0100, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/13 08:30, Ian Renner wrote: Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's

Re: [R] Help with functions as arguments

2013-02-12 Thread Duncan Murdoch
On 13-02-12 5:34 AM, Jan T Kim wrote: On Tue, Feb 12, 2013 at 09:38:19AM +0100, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/13 08:30, Ian Renner wrote: Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of

Re: [R] Help with functions as arguments

2013-02-12 Thread Frans Marcelissen
...@r-project.org [mailto:r-help-boun...@r-project.org] Namens Ian Renner Verzonden: dinsdag 12 februari 2013 8:30 Aan: r-help@r-project.org Onderwerp: [R] Help with functions as arguments Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments

Re: [R] Help with functions as arguments

2013-02-12 Thread David Winsemius
On Feb 12, 2013, at 12:38 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/02/13 08:30, Ian Renner wrote: Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's a bit tricky

[R] Help with functions as arguments

2013-02-11 Thread Ian Renner
Hi, I am trying to write a function which defines some arguments, then uses those arguments as arguments of other function calls. It's a bit tricky to explain, so a simple example will have to suffice. I imagine this has a simple solution, but perusing through environments and other help lists