7.3 Double For Loop

However, to have both \(i\) and \(t\) vary, we need to use a for loop. Note that the \(i\)-loop (the outer loop) is held constant while the \(t\)-loop (the inner loop) iterates first completely. The first iteration sets \(i = 0\) for values in \(t\), then increase \(i\) by \(0.01\) for all values in \(t\).

for (i in seq(0, 0.05, 0.01) ){
  for (t in seq(0, 6, 1)){
  print(simple(i,t))
}}

Run each of these loops so that you can see the results.