[R] Simplex "Out of Bounds" Error
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Oct 11 10:34:59 CEST 2003
On Sat, 11 Oct 2003 hstoll at latte.harvard.edu wrote:
> 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.)
I assume this is function simplex() in package boot, although you did not
say so. If so, did you contact the author (and not the maintainer) who
may well not read R-help but is the person most likely to be able to
supply a fix?
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list