# NOT RUN {
data(mapTest)
qProb=c(0.3,0.5)
criti = correctionTree(qProb,mapTest)
best = criti$zk[[2]][[1]]
Z=best$zonePolygone
plotZ(Z)
refPoint = rgeos::gCentroid(Z[[4]])
sp::plot(refPoint,add=TRUE,col="blue",pch=21)
zg=optiGrow(best,4,qProb,refPoint,mapTest) #grow zone 4
id=as.numeric(getZoneId(Z[[4]]))
linesSp(zg$Zopti[[id]],col="blue") # new zoning with grown zone 4
# }
Run the code above in your browser using DataLab