[R] (subscript) logical subscript too long
marammagdysalem at gmail.com
Wed Sep 30 17:33:23 CEST 2015
I'm trying to write a function in the values of some numeric vectors
(d1,d2,...,d(m-1)). This function should be applied on some combinations
of the elements of the (m-1) d vectors that satisfy the condition of having
a sum less than or equal to (n-m). I've tried the following code, but got
an error:(subscript) logical subscript too long.
> for (i in 1:m-1)
> ED <- do.call(`expand.grid`,as.data.frame(D))
Error in w[rowSums(ED) <= (n - m), ] :
(subscript) logical subscript too long
Bearing in mind that the true values of n and m might be way larger than 20
and 6, consecutively.
Any Suggestions please?
[[alternative HTML version deleted]]
More information about the R-help