Displaying 1 result from an estimated 1 matches for "tp3031667p3031667".
2010 Nov 08
5
How to eliminate this for loop ?
...create a list recursively and eliminate my for loop :
a<-c()
a[1] <- 1; # initial value
for(i in 2:N) {
a[i]<-a[i-1]*b - c[i-1] # b is a value, c is another vector
}
Is it possible ?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/How-to-eliminate-this-for-loop-tp3031667p3031667.html
Sent from the R help mailing list archive at Nabble.com.