title: Save a for loop in R
body: <p>i want to save a for output</p>
  <pre><code>for (a in 2017:2018){
  
  for (b in 1:12){
  for (c in 1:30){
    
    RSM &lt;- subset(RS,Ano==a &amp; Mes==b &amp; Dia==c)
    dime &lt;- dim(RSM)
    tdia  = dime[c(1)]
    
  }
  }
  }
  </code></pre>
  <p>i want to save tdia for each day each mont for 2017 and 2018 in a single csv.
  Any idea?</p>