Skip to content
Prev 277835 / 398506 Next

number of items to replace is not a multiple of replacement length

Le vendredi 18 novembre 2011 ? 04:45 -0800, Gyanendra Pokharel a ?crit :
The message is relatively clear. ;-)

It means the number of elements in the mh1.epidemic(n,x1[i],x2[i])
vector isn't a multiple of the number of elements in X[i, ]. In the
standard case, you want these two vectors to be of the same length, and
there are too many or too few elements in mh1.epidemic(n,x1[i],x2[i]).

You can check that with by looking at:
length(mh1.epidemic(n,x1[i],x2[i]))
and
length(X[i, ])


Cheers