[R] scope of an argument in a function

2010-07-15 Thread Raghu
Hi I am trying to define a function fu() in the following way but when I try to run I get the error that ma1 is not found. I am not sure where I am going wrong? Does the scope of ma1 not extend to an expr.frame object? expr.frame() is under library tradesys. function (y,ma1,ma2) { x - y[,

Re: [R] scope of an argument in a function

2010-07-15 Thread Duncan Murdoch
On 15/07/2010 3:06 AM, Raghu wrote: Hi I am trying to define a function fu() in the following way but when I try to run I get the error that ma1 is not found. I am not sure where I am going wrong? Does the scope of ma1 not extend to an expr.frame object? expr.frame() is under library tradesys.