can not solve r

> for (i in 1:N) {
+     f.obj <- c(0*rep(1,s),as.numeric(outputs[i,]))
+     f.con <- rbind(aux ,c(as.numeric(inputs[i,]), rep(0,1,m)))
+     results <- lp ("max",as.numeric(f.obj), f.con, f.dir, f.rhs,scale=0, compute.sens=TRUE)
+     if (i==1) {
+         weights <- results$solution
+         effcrs <- results$objval
+         lambdas <- results$duals[seq(1,N)]
+     } else {
+         weights <- rbind(weights, results$solution)
+         effcrs <- rbind(effcrs , results$objval)
+         lambdas <- rbind(lambdas, results$duals[seq(1,N)] )
+     }
+ } 
Error in rep(1, s) : invalid 'times' argument

Because ? Please answer me .. Thank you so much

I do not see where s is defined in the code, so I cannot tell what the problem is. What is s?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.