I am trying to create a looping function that takes 252 rows of a matrix from
1, then the next 252 rows of a matrix from 1+1, so on and so forth until
nrow of the matrix.

I am using the for + if loop combo but I seem to be stuck on the if portion.
I'm trying to code if so that if the row is less than the last row in matrix
ret, it will keep running, else break.

Here is what I have so far:

for(i in 1:i+252) {
+ if(ret[<=nrow(ret),])


Any help would be appreciated very very much. Thank you!

--
View this message in context: 
http://r.789695.n4.nabble.com/Help-with-a-repeating-process-tp4634336.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.

Reply via email to