Dear R developers,

I find the which.min function very handy. However, maybe you could 
consider a tiny addition to the example data in the the help text.

By adding another zero to the vector x...

x <- c(1:4, 0, 0:5,11)

...the example would more explicitly show that which.min actually 
'giv[es] the index of the /first/ minimum or maximum respectively of x'. 
This will also more clearly distinguish it from which(x == min(x)) that 
is mentioned in the text.

which.min(x)
[1] 5
>  which(x == min(x))
[1] 5 6


The 'first' is emphasized by italics in the Value section, while it is 
parenthesized in Description. I believe that the parenthesis could be 
removed, and 'first' possibly could be emphasized here as well.


Well, well, just a small suggestion. Thank you all for your great work.

Best regards,

Henrik

-- 
Henrik Pärn
Centre for Conservation Biology
Department of Biology
Norwegian University of Science and Technology
NO-7491 Trondheim
NORWAY

Office: +47 735 96084
Mobile: +47 909 89 255
Fax: +47 735 96100


        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to