R: Simplex error: NAs are not allowed in subscripted assignments
问题 For the following minimization with objective function and constraints, boot.simplex returns an error: Error in tab[-pr, ] <- tab[-pr, ] - (tab[-pr, pc]/pv) %o% tab[pr, ] : NAs are not allowed in subscripted assignments The code is here: library(boot) a = c(1, 1, 1) A2 = rbind(c(2, 7.5, 3), c(20, 5, 10)) b2 = c(10000, 30000) simplex(a=a, A2=A2, b2=b2, maxi=FALSE) Note that the constraints are only of the greater-than-equal-to type. But, if a bogus less-than-or-equal-to constraint is added as