[R] minimum distances
Dave Depew
ddepew at sciborg.uwaterloo.ca
Thu Mar 20 17:32:49 CET 2008
Hi,
I have a question about computing shortest Euclidean distances between
two data frames of spatial points...
I have 2 dataframes (not yet converted to spatial class)
>Sewers<-data.frame(x=c(10,20,35,50),y=c(100,150,200,300))
>transect <- data.frame(x=seq(from=0, to=50, by=1),y=seq(from=100,
to=150, by=1))
I would like to be able to compute the shortest distance from the
transect points the nearest sewer (Euclidean distance)
I've tried a number of different loops, but so far ave had no luck.
Any help would be appreciated
More information about the R-help
mailing list