so I have to create a for loop of the geometric sequence h(x,n)=1+x+x^2+x^3^4...x^n. I know that it would be easier to simply vectorize the sequence to x^(0:n), but I am required to make the loop, and I can't wrap my brain around how to loop it because the equation is so simple.
-- View this message in context: http://r.789695.n4.nabble.com/for-loop-of-a-geometric-sequence-tp4675035.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.