Displaying 1 result from an estimated 1 matches for "xeast".
Did you mean:
least
2008 Sep 16
1
Spatial join – optimizing code
...I am running R 2.7.1 patched.
I wonder if any of you can suggest 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...