Re: [R] Minimum distance

From: Douglas Bates <>
Date: Mon 18 Apr 2005 - 10:20:28 EST

Williams, Michael wrote:
> G'day, I have a matrix 20000 x 500 populated with all the distances
> between a list of airports and a list of towers. What I'm having trouble
> doing is finding the closest airport to each tower, Any help would be
> greatly appreciated.
> Regards,
> Michael Williams

Sounds like you want to apply the function which.min to the rows of the matrix. See



?which.min mailing list PLEASE do read the posting guide! Received on Mon Apr 18 14:26:47 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:15 EST