title: How to add column names to the existing csv
body: <p>I want to do some analysis on an existing CSV file. However, Since the original file doesn't have a header, the Rstudio automatically set the first row as the header. Since some of the elements in the first row appear in the rest of the code, I couldn't just replace them and append a new record. Could anyone help me with this, please?</p>
  
  <p>This the code. </p>
  
  <pre><code>adultdata &lt;- read.csv("adultdata.csv",head=T,sep=',',fileEncoding = "UTF-8")
  </code></pre>
  
  <p>adultdata</p>
  
  <pre><code>X39       State.gov     X77516   Bachelors   X13    Never.married
  &lt;int&gt;     &lt;fctr&gt;         &lt;int&gt;    &lt;fctr&gt;     &lt;int&gt;  &lt;fctr&gt;
  50  Self-emp-not-inc    83311    Bachelors   13     Married
  38  Private             215646   HS-grad     9      Divorced
  53  Private             234721   11th        7      Married
  </code></pre>
  
  <p>What I wanna get is something like this</p>
  
  <pre><code>age     workclass         fnlwgt    education   education-num  marital-status
  39      State.gov         77516     Bachelors   13             Never.married
  50      Self-emp-not-inc  83311     Bachelors   13             Married
  38    Private             215646    HS-grad     9              Divorced
  53    Private             234721    11th        7              Married
  </code></pre>