7.2 Simple For Loop
Suppose that for a fixed \(i = 0.05\), we create a for loop for \(t\) ranging from 0 to 6 by 1.
This loop looks like:
<- 0.05
i for (t in 1:6){
print(simple(i,t))
}
With the user-defined function simple, we add the print function to see the results. For this purpose, the for loop is unnecessary as we can get at the same result by defining a vector \(t\) as we did in subsection 6.3 called User-Defined Functions.