# NOT RUN {
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-30; 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)
NumArcsCSMT(Xp,Yp,t=.5)
TSArcDensCSMT(Xp,Yp,t=.5)
TSArcDensCSMT(Xp,Yp,t=.5,ch=TRUE)
NumArcsCSMT(Xp,Yp,t=1.0)
TSArcDensCSMT(Xp,Yp,t=1.0)
TSArcDensCSMT(Xp,Yp,t=1.0,ch=TRUE)
NumArcsCSMT(Xp,Yp,t=1.5)
TSArcDensCSMT(Xp,Yp,t=1.5)
TSArcDensCSMT(Xp,Yp,t=1.5,ch=TRUE)
t<-2
TSArcDensCSMT(Xp,Yp,t)
Xp<-runif.tri(nx,Yp[1:3,])$g
TSArcDensCSMT(Xp,Yp[1:3,],t)
TSArcDensCSMT(Xp,rbind(Yp,Yp),t)
dat.fr<-data.frame(a=Xp)
TSArcDensCSMT(dat.fr,Yp,t)
dat.fr<-data.frame(a=Yp)
TSArcDensCSMT(Xp,dat.fr,t)
TSArcDensCSMT(Xp,Yp,t=.5)
#gives an error message if Xp=c(.4,.2) since not enough points in the convex hull
#of non-target points to compute arc density of the target points
# }
Run the code above in your browser using DataLab