Click here to view the visual representation
I am seeking assistance in translating the following JavaScript code into R and displaying the values at each iteration:
r=4
q=0.02
V=0.01;
S=0.1;
U=0.89;
for(i<200){
i++;
v = V;
s = S;
u = U;
V = r*v*s;
S = s - r*v*s + q*u;
U = 1 - v - s;
}
If you have expertise in both languages, your help would be greatly appreciated. Thank you!