library(rPAex)
prg1 <- system.file("examples/Ex-01.R", package="rPAex")
source(prg1)
r<-data1()
oldpar<-par(mar=c(2,2,4,2),cex=0.8)
raster::image(r,main="Generating the fourth point of the study plot",col=col2rgb(10))
#P<-locator(3)
P<-list(x=c(20,80,80),y=c(70,80,30))
Q<-fourPoint(P)
polygon(Q,lty=2,density=8)
text(Q,cex=2)
points(Q[4,1],Q[4,2],cex=6,col=2,lwd=2)
par(oldpar)
Run the code above in your browser using DataLab