search for: ynorth

Displaying 1 result from an estimated 1 matches for "ynorth".

Did you mean: north
2008 Sep 16
1
Spatial join – optimizing code
...or help (or have time) in optimizing this code to make it run faster. My programming skills are not high enough to do it. Thanks, Monica #### code follows: #### x a data frame with over 30000 points with coord in UTM, xeast, xnorth #### y a data frame with over 4000 points with UTM coord (yeast, ynorth) and ##### classification ### calculating Euclidian distance dist <- function(xeast, xnorth, yeast, ynorth) { ((xeast-yeast)^2 + (xnorth-ynorth)^2)^0.5 } ### doing the merge by location with minimum distance dist.merge <- function(x, y, xeast, xnorth, yeast, ynorth){ tmp <- t(apply(x[,...