Re: [R] Four concurrent Markov chains

2009-09-21 Thread drlucyasher
Oh dear! Yes I see now that when I update j to i then this won't work... but I'm now stuck trying to think of a way round this. I've tried moving all script to before the i<- j command and leaving it out all together but neither work. Any ideas? -- View this message in context: http://www.nabb

Re: [R] Four concurrent Markov chains

2009-09-21 Thread Rainer M Krug
A few comments below On Mon, Sep 21, 2009 at 3:10 PM, drlucyasher wrote: > > Hi, > > I am trying to write a simulation of the movements of four animals between > six patches. The movement between patches is based on a first-order Markov > chain so that the next patch they visit depends on the pa

[R] Four concurrent Markov chains

2009-09-21 Thread drlucyasher
Hi, I am trying to write a simulation of the movements of four animals between six patches. The movement between patches is based on a first-order Markov chain so that the next patch they visit depends on the patch they were in before. I have written code that allows me to simulate the movement