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
Hi Ian,
The remark of Rainer is correct, but I think the solution is very simpe:
f1 = function(a)
{
b = a + 1
b
}
f2 = function(x, z)
{
y = x*z(x) -2
y
}
> f2(x = 3, z = f1)
[1] 10
Or are you intending something else?
Best wishes,
Frans
-Oorspronkelijk bericht-
Van: r-help-boun...
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
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 functio
On Tue, Feb 12, 2013 at 7:30 AM, Ian Renner 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 within the fu
-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 suff
6 matches
Mail list logo