# NOT RUN {
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
dist.pt2set(c(1,2),Te)
X2<-cbind(runif(10),runif(10))
dist.pt2set(c(1,2),X2)
dist.pt2set(C,C)
dist.pt2set(B,C)
x<-runif(1)
y<-as.matrix(runif(10))
dist.pt2set(x,y) #this works, because x is a 1D point, and y is treated as a set of 10 1D points
#but will give an error message if y<-runif(10) is used above
dat.fr<-data.frame(b=B,c=C)
dist.pt2set(A,dat.fr)
# }
Run the code above in your browser using DataLab