# 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),runif(nx))
Yp<-cbind(runif(ny),runif(ny))
oldpar <- par(no.readonly = TRUE)
plotDeltri(Xp,Yp,xlab="",ylab="")
par(oldpar)
M<-c(1,1,1) #try also M<-c(1,2,3)
NumArcsCSMT(Xp,Yp,t=.5,M)
NumArcsCSMT(Xp,Yp,t=1.,M)
NumArcsCSMT(Xp,Yp,t=1.5,M)
NumArcsCSMT(c(.4,.2),Yp,t=.5,M)
NumArcsCSMT(c(.4,.2),Yp[1:3,],t=.5,M)
t<-2
NumArcsCSMT(Xp,Yp,t,M)
NumArcsCSMT(Xp,Yp[1:3,],t,M)
NumArcsCSMT(Xp,rbind(Yp,Yp),t,M)
dat.fr<-data.frame(a=Xp)
NumArcsCSMT(dat.fr,Yp,t,M)
dat.fr<-data.frame(a=Yp)
NumArcsCSMT(Xp,dat.fr,t,M)
# }
Run the code above in your browser using DataLab