title: Reading multiple offline html files to a list in R
body: <p>I have rawdata as 20 offline html files stored in following format</p>
  
  <pre><code>../rawdata/1999_table.html
  ../rawdata/2000_table.html
  ../rawdata/2001_table.html
  ../rawdata/2002_table.html
  .
  .
  ../rawdata/2017_table.html
  </code></pre>
  
  <p>These files contain tables that I am extracting and reshaping to a particular format. </p>
  
  <p>I want to read these files at once to a list and process them one by one through a function that I have written. </p>
  
  <p>What I tried: 
  I put the names of these files into an Excel file called filestoread.xlsx and used a for loop to load these files using the names mentioned in the sheet. But it doesn't seem to work</p>
  
  <pre><code>filestoread &lt;- fread("../rawdata/filestoread.csv")
  
  x &lt;- list()
  for (i in nrow(filestoread)) {
    x[[i]] &lt;- read_html(paste0("../rawdata/", filestoread[i]))
  }
  </code></pre>
  
  <p>How can this be done? </p>
  
  <p>Also, after reading the HTML files I want to extract the tables from them and reshape them using a function I wrote after converting it to a data table. </p>
  
  <p>My final objective is to rbind all the tables and have a single data table with year wise entries of the tables in the html file.</p>