Displaying 1 result from an estimated 1 matches for "lavrenz".
Did you mean:
laurenz
2012 Apr 10
5
Creating a loop with an indefinite end term
Everyone,
I'm very new to R, especially when it comes to loops and functions, so
please bear with me if this is an elementary question. I cannot seem to
figure out how to construct a loop which runs a function until a certain
value is computed. For example, say I have the following:
num = numeric (10)
num [1] = 0
for (i in 2:10) {
num [i] = num [i-1] + 5
}
This adds 5 to the