title: How to download data for each year via a loop R
body: <p>I am able to download data for one year (i.e. 2008) using the script below and details are found <a href="https://cran.r-project.org/web/packages/ecmwfr/vignettes/cds_vignette.html" rel="nofollow noreferrer">here</a>:</p>
  <pre><code>library (ecmwfr)
  
  # Specify the data set
  request &lt;- list(&quot;dataset&quot;        = &quot;reanalysis-era5-pressure-levels&quot;,
                  &quot;product_type&quot;   = &quot;reanalysis&quot;,
                  &quot;variable&quot;       = &quot;temperature&quot;,
                  &quot;pressure_level&quot; = &quot;850&quot;,
                  &quot;year&quot;           = &quot;2008&quot;,
                  &quot;month&quot;          = &quot;04&quot;,
                  &quot;day&quot;            = &quot;04&quot;,
                  &quot;time&quot;           = &quot;00:00&quot;,
                  &quot;area&quot;           = &quot;70/-20/30/60&quot;,
                  &quot;format&quot;         = &quot;netcdf&quot;,
                  &quot;target&quot;         = &quot;era5-demo.nc&quot;)
  
  
  # Start downloading the data, the path of the file
  # will be returned as a variable (ncfile)
  
  ncfile &lt;- wf_request(user = &quot;2088&quot;,
                        request = request,   
                        transfer = TRUE,  
                        path = &quot;~&quot;,
                        verbose = FALSE)
  </code></pre>
  <p><strong>Question:</strong> How can I download the data by year for the period 2008-2017 using the code above? The downloaded file names should have the specific year appended to them.</p>