# NOT RUN {
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-4; #try also nx<-40; ny<-10 or nx<-1000; ny<-10;
set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,1),runif(ny,0,1))
M<-c(1,1,1) #try also M<-c(1,2,3)
r<-1.5 #try also r<-2
PEdomMT(Xp,Yp,r,M)
PEdomMT(Xp,Yp,r=1.4,M)
PEdomMT(Xp,Yp,r=2,M)
r<-1.5 #try also r<-2
PEdomMT(Xp,Yp,r,M) #this may be different due to random selection of the center for r in (1,1.5)
PEdomMT(Xp,Yp,r,M)
PEdomMT(Xp,Yp[1:3,],r,M)
PEdomMT(Xp,rbind(Yp,Yp),r,M)
dat.fr<-data.frame(a=Xp)
PEdomMT(dat.fr,Yp,r,M)
dat.fr<-data.frame(a=Yp)
PEdomMT(Xp,dat.fr,r,M)
# }
Run the code above in your browser using DataLab