Makes sense.

Thanks guys for your quick reverts!
-Abhi

On Tue, Apr 27, 2010 at 3:34 PM, Erik Iverson <er...@ccbr.umn.edu> wrote:
>
>
> Abhishek Pratap wrote:
>>
>> Hi Guys
>>
>> Thank you for clearing something I dint know. Just wondering the
>> reason of putting the word function(x)  in the apply function when we
>> have already declared stats function separately.
>>
>> I better understand how the arguments are passed.
>>
>> Thanks!
>> -Abhi
>>
>
> That's creating a *new* function, one without a name, that basically "breaks
> up" the x argument into two values, and passes those along with the third
> argument and passes these to your stats function.  You either have to write
> stats to accept two arguments, or leave stats accepting three arguments and
> use this method.
>

______________________________________________
R-help@r-project.org 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