title: Subsetting odd rows in r using seq
body: <p>Hope it is not a too newbie question.</p>
  
  <p>I am trying to subset rows from the GDP UK dataset that can be downloaded from here:
  <a href="http://www.ons.gov.uk/ons/site-information/using-the-website/time-series/index.html" rel="nofollow">http://www.ons.gov.uk/ons/site-information/using-the-website/time-series/index.html</a></p>
  
  <p>The dataframe looks more or less like that:</p>
  
  <pre><code>       X    ABMI
  1   1948    283297
  2   1949    293855
  3   1950    304395
  </code></pre>
  
  <p>....</p>
  
  <pre><code>300 2013 Q2 381318
  301 2013 Q3 384533
  302 2013 Q4 387138
  303 2014 Q1 390235
  </code></pre>
  
  <p>The thing is that for my analysis I only need the data for years 2004-2013 and I am interested in one result per year, so I wanted to get every fourth row from the dataset that lies between the 263 and 303 row.</p>
  
  <p>On the basis of the following websites:</p>
  
  <p><a href="https://stat.ethz.ch/pipermail/r-help/2008-June/165634.html" rel="nofollow">https://stat.ethz.ch/pipermail/r-help/2008-June/165634.html</a>
  (plus a few that i cannot quote due to the link limit)</p>
  
  <p>I tried the following, each time getting some error message:</p>
  
  <pre><code>&gt; GDPUKodd &lt;- seq(GDPUKsubset[263:302,], by = 4)
      Error in seq.default(GDPUKsubset[263:302, ], by = 4) : 
    argument 'from' musi mieæ d³ugoœæ 1
  
  &gt; OddGDPUK &lt;- GDPUK[seq(263, 302, by = 4)]
      Error in `[.data.frame`(GDPUK, seq(263, 302, by = 4)) : 
    undefined columns selected
  
  &gt; OddGDPUKprim &lt;- GDPUK[seq(263:302), by = 4]
  Error in `[.data.frame`(GDPUK, seq(263:302), by = 4) : 
    unused argument (by = 4)
  
  &gt; OddGDPUK &lt;- GDPUK[seq(from=263, to=302, by = 4)]
  Error in `[.data.frame`(GDPUK, seq(from = 263, to = 302, by = 4)) : 
    undefined columns selected
  
  &gt; OddGDPUK &lt;- GDPUK[seq(from=GDPUK[263,] to=GDPUK[302,] by = 4)]
  Error: unexpected symbol in "OddGDPUK &lt;- GDPUK[seq(from=GDPUK[263,] to"
  
  &gt; GDPUK[seq(1,nrows(GDPUK),by=4),]
  Error in seq.default(1, nrows(GDPUK), by = 4) : 
    could not find function "nrows"
  </code></pre>
  
  <p>To put a long story short: help!</p>