library(sp)
# load observation - data frame
data(dtempc)
# load stations - data frame
data(stations)
str(dtempc)
str(stations)
if (FALSE) {
# create STFDF - from 2 data frames
temp <- meteo2STFDF(dtempc,
stations,
crs = CRS('+proj=longlat +datum=WGS84'))
nrow(temp@sp) # number of stations before removing dupl.
temp2 <-rm.dupl(temp, zcol = 1, zero.tol = 50) # 50 km
nrow(temp2@sp) # number of stations after
}
Run the code above in your browser using DataLab