title: Import multiple txt files with different dimensions and different sizes of names as separated dataframes
body: <p>I have 2 txt files named <code>In1B_HZM_VC_Suppl_astaxanthin.txt</code> and <code>In2B_HZM_VC_Suppl_beta-carotene.txt</code> with the following structure:</p>
  
  <pre><code>#txt1
  Result1 GSK3B   SNCA    SOD2    APP NDUFS7  CAT KCNJ6   TNF PIK3R1  NOS2    EDN1    GSR NOS3    NDUFB6  CASP3
  Result2 NDUFS8  NDUFS2  NDUFS3  ETFDH   NDUFV2  SDHA    SDHB    NDUFV1  NDUFS1  NDUFS7
  Result3 COQ2
  
  #txt2
  Result1 DDR1    CXCL8   MMP1    PTGS2   RPS6KA5 TNNT2
  Result2 NQO1    IL1B    CYP1A1  SP1 LEPR    TNF POR HMOX1   TP53    GRIN1   NFE2L2  GJA1
  </code></pre>
  
  <p>I'm trying to find a way to import these 2 files as separated dataframes since they are located in the same folder in my work directory.</p>
  
  <p>I tried:</p>
  
  <pre><code>files &lt;- list.files(path = "C:/Users/user/Documents/HZM/SourceDatasets", pattern = "*.txt", full.names = T)
  </code></pre>
  
  <p>which creates a list of their pattern and names</p>
  
  <p>and then:</p>
  
  <pre><code>myfiles = lapply(files, read.delim) 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>for (i in 1:length(files)) assign(files[i], read.delim(files[i]))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>list2env(
    lapply(setNames(files, make.names(gsub("*.csv$", "", files))), 
           read.delim), envir = .GlobalEnv)
  </code></pre>
  
  <p>which give me an error message: </p>
  
  <pre><code>Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
    more columns than column names
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>##Create list of data frame names without the ".csv" part 
  names &lt;-substr(files,44,68)
  
  ###Load all files
  for(i in names){
    filepath &lt;- file.path("C:/Users/user/Documents/HZM/SourceDatasets",paste(i,".txt",sep=""))
    assign(i, read.delim(filepath,
                         colClasses=c("character","factor",rep("numeric",4)),
                         sep = "\t"))
  }
  </code></pre>
  
  <p>but my txt files have names with different sizes.</p>
  
  <p>You can find the files <a href="https://www.dropbox.com/sh/pn0xiw334ajg5ul/AADAOyok4LDr5kaeYzmIOHXFa?dl=0" rel="nofollow noreferrer">here</a></p>