Skip to content
Prev 181584 / 398502 Next

Defining functions - an interesting problem

On Wed, 2009-05-27 at 19:41 +0530, utkarshsinghal wrote:
What is the second argument of rank? It is not ties.method. You passed
"min" to na.last, not ties.method. You need to name the argument if you
are not passing in all arguments and in the correct order.
Why randomly - ?rank tells you the argument is ties.method so you should
set it to ties.method: times.method = ties.method in your call to rank.
Because you aren't passing ties.method as the same argument in f1 and
f2. In f1 you are passing ties.method to na.last, in f2 you do it
correctly.
Here there are only two arguments and you supplied them in the correct
place when you supplied them un-named.

HTH

G