Warning: Error in [: incorrect number of dimensions
Trying to widdle it down, I think the this call causes the problem.
multinomial(c(k, n - k))[seq_len(k), , drop = FALSE]
# Error in multinomial(c(k, n - k))[seq_len(k), , drop = FALSE] :
# incorrect number of dimensions
This smells like some hidden R shenanigans. Currently, I've just hard-coded the case if both n == k == 1 and have it return matrix(1).
Calling
allbinom(1,1)
causes the following errorTrying to widdle it down, I think the this call causes the problem.
This smells like some hidden R shenanigans. Currently, I've just hard-coded the case if both
n == k == 1
and have it returnmatrix(1)
.