How to average every 12 columns for each row in r : <p>I have a matrix which contains 100 rows and 120 columns, I wonder how I can find the mean value for every 12 columns for each row. so I can have the annual mean. Thanks.</p>

<pre><code>set.seed(1234)
data=rnorm(100*120)
data=matrix(data,nrow = 100,ncol = 120)
</code></pre>
