title: Reading a zip file in R without knowing the csv file name within it
body: <p>I am trying to read a zip file that has 1 csv file in it. </p>
  
  <p>It works great when I know the csv file name but when I just try to extract the zip file alone, it doesn't work. </p>
  
  <p>Here is an example of where it does works: </p>
  
  <pre><code>zip_file &lt;- abc.zip
  csv_file &lt;- abcde.csv
  
  data &lt;- read.table(unz(zip_file,csv_file), skip = 10, header=T, quote="\"", sep=",")
  </code></pre>
  
  <p>Here is where it doesn't work when I try to only extract the zip file:</p>
  
  <pre><code>read.table(zip_file, skip = 10, nrows=10, header=T, quote="\"", sep=",")
  </code></pre>
  
  <p>An error comes up saying: </p>
  
  <pre><code>Error in read.table(attachment_file, skip = 10, nrows = 10, header = T,  : 
    no lines available in input
  In addition: Warning messages:
  1: In readLines(file, skip) : line 2 appears to contain an embedded nul
  2: In readLines(file, skip) : line 3 appears to contain an embedded nul
  3: In readLines(file, skip) :
    incomplete final line found on 
  'C:\Users\nickk\AppData\Local\Temp\RtmpIrqdl8\file2c9860d62381'
  </code></pre>
  
  <p>So this shows there is definitely a csv file present because it works when I include the csv file name but when I just do the zip file, then the error comes up. </p>
  
  <p>For context, the reason why I do not want to include the csv file name is because I need to read this zip file daily and the name of the csv file changes with no pattern everytime. So my goal is to only read the zip file to bypass this. </p>
  
  <p>Thanks!</p>