Nick -
Ask yourself what happens in min(as.integer(names(cump[rand<(cump*100)])))
when the random number happens to be larger than the first entry in the
relevant column of p.trans. How many elements in the comparison are true ?
In that case, I think you are taking the minimum of zero elements
I'm having trouble using some fairly simple code to change the entries
in a vector (x - the numbers 0-5) according to a simple transition
matrix that I've called p.dry.
the error message I get is
"no finite arguments to min; returning Inf"
Any suggestions as to where I'm going wrong greatly a