Displaying 1 result from an estimated 1 matches for "firstgain".
Did you mean:
firstfan
2009 May 07
2
for loop vectorization
...for (j in 1:length(states)) {
if (manhattandistance(i, j)==1) {
if (sum(findstatedim(i)-findstatedim(j)) < 0) {
transition[i,j] = "gain"
if (findstatedim(i)[findstatedim(i)-findstatedim(j) == -1] == 1)
{
transition[i,j] = "firstgain"
}
}
else {
transition[i,j] = "loss"
}
}
}
}
transition
[[alternative HTML version deleted]]