[R] Regular repeats
jsf1982
jamie.freeman at ucl.ac.uk
Tue Aug 13 18:46:06 CEST 2013
Hi,
Many apologies for the simplicity (hopefully!) of this request - I can't
find it on the forum, but it may have been asked in the past.
I have a data frame consisting of ~2000 rows. I simply want to take the
average of the first 6, then the next 6, then the next 6 until the end of
the table.
The command
mean(mole[1:6,c("PercentPI")])
gets me the first 6 rows (column is PercentPI), but I don't know how to
increase the rows incrementally.
Thanks in advance.
J
--
View this message in context: http://r.789695.n4.nabble.com/Regular-repeats-tp4673653.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list