[R] Simplex "Out of Bounds" Error

hstoll@latte.harvard.edu hstoll at latte.harvard.edu
Sat Oct 11 06:15:59 CEST 2003


I am running the following code (testing the use of the simplex function to 
determine if a point is in the convex hull of another set of points or not):

>a <- c(0, 0)
>A3 <-matrix(c(1,2,3,4,1,1), ncol = 2, byrow = T)
>b3 <-c(1.5, 3.5, 1)
>simplex(a = a, A3 = A3, b3 = b3)

and the following error message appears:
 Error in simplex1(out1$a[1:(n + m1 + m2)], out1$A[, 1:(n + m1 + m2)],  : 
        subscript out of bounds

Any advice on why this error is appearing and how to avoid it?  (Particularly 
the latter?)  In terms of the convex hull problem, this error seems to occur 
when the point in question (in the convex hull or not) is on the edge/surface 
of the convex hull.  But I'm not positive about this.  

Thanks in advance.

(I've noticed a few other posts of this problem, but never saw anyone reply.)




More information about the R-help mailing list