title: Create a sequence along the whole dataset increasing by certain number in R
body: <p>How to create a new variable in the dataframe with a sequence increasing by 0.002, starting at 0 and running until the end of the dataset. I was attempting with:</p>
  <pre><code>dataset$seq = seq(0, length(dataset), by = 0.002)
  dataset$seq = seq(0, nrow(dataset), by = 0.002)
  </code></pre>
  <p>But both throw an error about wrong lengths. Thanks for your help.</p>