if (FALSE) {
library(rgdal)
library(gstat)
rpath = system.file("extdata",package="rtop")
setwd(rpath)
observations = readOGR(".","observations")
# Create a column with the specific runoff:
observations$obs = observations$QSUMMER_OB/observations$AREASQKM
predictionLocations = readOGR(".","predictionLocations")
params = list(cloud = TRUE, gDist = TRUE)
rtopObj = createRtopObject(observations, predictionLocations, 
                           params = params)
# Fit a variogram (function also creates it)
rtopObj = rtopFitVariogram(rtopObj)
checkVario(rtopObj, 
    compVar = list(first = vgm(5e-6, "Sph", 30000,5e-8), 
                   second = vgm(2e-6, "Sph", 30000,5e-8)))
rtopObj = checkVario(rtopObj, acor = 0.000001, 
          acomp = data.frame(acl1 = c(2,2,2,2,3,3,3,4,4), 
          acl2 = c(2,3,4,5,3,4,5,4,5)))
rtopObj = checkVario(rtopObj, cloud = TRUE, identify = TRUE, 
          acor = 0.000001)
}
Run the code above in your browser using DataLab