The code has an error so it won't run as written. Instead of: infectrate[n]= (400)(1.1)^(n);
try: infectrate[n]= 400*1.1^n; What I get after making this change looks right. -- View this message in context: http://r.789695.n4.nabble.com/For-Loops-please-help-tp4711882p4711884.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.