title: How can I read the header but also skip lines - read.table()?
body: <p>Data.txt:</p>
  
  <pre><code>Index;Time;
  1;2345;
  2;1423;
  3;5123;
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>dat &lt;- read.table('data.txt', skip = 1, nrows = 2, header =TRUE, sep =';')
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>  X1 X2345
  1  2  1423
  2  3  5123
  </code></pre>
  
  <p>I expect the header to be Index and Time, as follows:</p>
  
  <pre><code>  Index Time
  1   2   1423
  2   3   5123
  </code></pre>
  
  <p>How do I do that?</p>