# use corn crop information
library(rPAex)
crop <- system.file("external/corn.csv", package="rPAex")
s<-read.csv(crop,header = TRUE)
r <- raster::rasterFromXYZ(s)
raster::image(r,useRaster=FALSE,main="Area outside the experimental plot")
#P<-locator(3)
# simulated area
P<-list(x=c(287705.9, 287711.8, 287712.8),y=c(8664203.15, 8664204.8, 8664193.67))
Q<-fourPoint(P)
models<-borderPoint(Q)
abline(models$m1)
abline(models$m2)
abline(models$m3)
abline(models$m4)
text(Q,cex=2)
Run the code above in your browser using DataLab