On Fri, 30 Oct 2009 10:28:49 +0100 Karl Ove Hufthammer <k...@huftis.org> 
wrote:
> $ (pos=which(order(abs(iris$Sepal.Length-x)) %in% 2:6))

This should of course be:
(pos=order(abs(iris$Sepal.Length-x))[2:6])

-- 
Karl Ove Hufthammer

______________________________________________
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