Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Stavros Macrakis
The 'ties.method' argument to 'rank' is the *third* positional argument to 'rank', so either you need to put it in the third position or you need to use a named argument. The fact that the variable you're using to represent ties.method is called ties.method is irrelevant. That is, this: ra

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread utkarshsinghal
Yeah, seems so obvious now. What a blunder, poor me. Perfect explanation. Thanks Thomas Lumley wrote: On Wed, 27 May 2009, utkarshsinghal wrote: I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Gavin Simpson
On Wed, 2009-05-27 at 19:41 +0530, utkarshsinghal wrote: > I define the following function: > (Please don't wonder about the use of this function, this is just a > simplified version of my actual function. And please don't spend your > time in finding an alternate way of doing the same as the fol

Re: [R] Defining functions - an interesting problem

2009-05-27 Thread Thomas Lumley
On Wed, 27 May 2009, utkarshsinghal wrote: I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And please don't spend your time in finding an alternate way of doing the same as the following does not exa

[R] Defining functions - an interesting problem

2009-05-27 Thread utkarshsinghal
I define the following function: (Please don't wonder about the use of this function, this is just a simplified version of my actual function. And please don't spend your time in finding an alternate way of doing the same as the following does not exactly represent my function. I am only intere