title: How to fill every nth row of a data.frame column with values from another data.frame's column?
body: <p>What I want to do is fill up a dataframe's column with values from a different dataframe's column. However, I only want every nth row to have a value inserted into it</p>
  
  <pre><code>temp &lt;- data.frame(value = numeric(312))
  temp_2 &lt;- matrix(3:80)
  </code></pre>
  
  <p>How can I insert temp_2's values into every 4th row of temp, so that temp will look like this?</p>
  
  <pre><code>head(temp, 12)
     value
  1       0
  2       0
  3       0
  4       3
  5       0
  6       0
  7       0
  8       4
  9       0
  10      0
  11      0
  12      5
  </code></pre>
  
  <p>My thoughts were that using seq() would be a good solution. Perhaps something similar to the code below, but without an error. To restate my goal, I want every sequential value from temp_2, to be put in every 4th row of temp, so that all of temp_2's values will fit in temp. However, this resulted in an "incorrect number of subscripts on matrix" error.</p>
  
  <pre><code>temp$value[seq(from = 4, to = 312, by = 4),1] &lt;- temp_2[1:78,1]
  </code></pre>