title: How to change the first row to be the header in R?
body: <p>I have the following table:</p>
  <pre><code>     X.5       X.6       X.7       X.8          X.9 X.10         X.11  X.12   X.13
  17   Zip CuCurrent PaCurrent PoCurrent      Contact  Ext          Fax email Status
  18  74136         0         1         0 918-491-6998    0 918-491-6659            1
  19  30329         1         0         0 404-321-5711                              1
  20  74136         1         0         0 918-523-2516    0 918-523-2522            1
  21  80203         0         1         0 303-864-1919    0                         1
  22  80120         1         0         0 345-098-8890  456                         1
  </code></pre>
  <p>how can make the first row 'zip, cucurrent, pacurrent...' to be the column header?</p>
  <p>Thanks,</p>
  <p>below is <code>dput(dat)</code></p>
  <pre><code>structure(list(X.5 = structure(c(26L, 14L, 6L, 14L, 17L, 16L), .Label = c(&quot;&quot;, 
  &quot;1104&quot;, &quot;1234 I don't know Ave.&quot;, &quot;139.98&quot;, &quot;300 Morgan St.&quot;, 
  &quot;30329&quot;, &quot;312.95&quot;, &quot;4101 S. 4th Street, Traff&quot;, &quot;500 Highway 89 North&quot;, 
  &quot;644.04&quot;, &quot;656.73&quot;, &quot;72160&quot;, &quot;72336-7000&quot;, &quot;74136&quot;, &quot;75501&quot;, 
  &quot;80120&quot;, &quot;80203&quot;, &quot;877.87&quot;, &quot;Address1&quot;, &quot;BZip&quot;, &quot;General Svcs Admin (WPY)&quot;, 
  &quot;InvFileName2&quot;, &quot;LDC_Org_Cost&quot;, &quot;N/A&quot;, &quot;NULL&quot;, &quot;Zip&quot;), class = &quot;factor&quot;), 
      X.6 = structure(c(7L, 2L, 3L, 3L, 2L, 3L), .Label = c(&quot;&quot;, 
      &quot;0&quot;, &quot;1&quot;, &quot;301 7th St. SW&quot;, &quot;800-688-6160&quot;, &quot;Address2&quot;, &quot;CuCurrent&quot;, 
      &quot;Emergency&quot;, &quot;LDC_Cost_Adj&quot;, &quot;Mtelemetry&quot;, &quot;N/A&quot;, &quot;NULL&quot;, 
      &quot;Suite 1402&quot;), class = &quot;factor&quot;), X.7 = structure(c(8L, 3L, 
      2L, 2L, 3L, 2L), .Label = c(&quot;&quot;, &quot;0&quot;, &quot;1&quot;, &quot;Address3&quot;, &quot;Cucustomer&quot;, 
      &quot;LDC_Misc_Fee&quot;, &quot;NULL&quot;, &quot;PaCurrent&quot;, &quot;Room 7512&quot;), class = &quot;factor&quot;), 
      X.8 = structure(c(14L, 2L, 2L, 2L, 2L, 2L), .Label = c(&quot;&quot;, 
      &quot;0&quot;, &quot;100.98&quot;, &quot;237.02&quot;, &quot;242.33&quot;, &quot;335.04&quot;, &quot;50.6&quot;, &quot;City&quot;, 
      &quot;Durham&quot;, &quot;LDC_FinalVolume&quot;, &quot;Leavenwoth&quot;, &quot;Pacustomer&quot;, 
      &quot;Petersburg&quot;, &quot;PoCurrent&quot;, &quot;Prescott&quot;, &quot;Washington&quot;), class = &quot;factor&quot;), 
      X.9 = structure(c(18L, 16L, 10L, 17L, 7L, 9L), .Label = c(&quot;&quot;, 
      &quot;0&quot;, &quot;1&quot;, &quot;139.98&quot;, &quot;20024&quot;, &quot;27701&quot;, &quot;303-864-1919&quot;, &quot;312.95&quot;, 
      &quot;345-098-8890&quot;, &quot;404-321-5711&quot;, &quot;644.04&quot;, &quot;656.73&quot;, &quot;66048&quot;, 
      &quot;86313&quot;, &quot;877.87&quot;, &quot;918-491-6998&quot;, &quot;918-523-2516&quot;, &quot;Contact&quot;, 
      &quot;LDC_FinalCost&quot;, &quot;PoCustomer&quot;, &quot;Zip&quot;), class = &quot;factor&quot;), 
      X.10 = structure(c(14L, 2L, 1L, 2L, 2L, 9L), .Label = c(&quot;&quot;, 
      &quot;0&quot;, &quot;2.620194604&quot;, &quot;2.710064788&quot;, &quot;2.717239052&quot;, &quot;2.766403162&quot;, 
      &quot;202-708-4995&quot;, &quot;3.09912854&quot;, &quot;456&quot;, &quot;804-504-7200&quot;, &quot;913-682-2000&quot;, 
      &quot;919-956-5541&quot;, &quot;928-717-7472&quot;, &quot;Ext&quot;, &quot;InvoicesNeeded&quot;, 
      &quot;LDC_UnitPrice&quot;, &quot;NULL&quot;, &quot;Phone&quot;), class = &quot;factor&quot;), X.11 = structure(c(7L, 
      4L, 1L, 5L, 1L, 1L), .Label = c(&quot;&quot;, &quot; &quot;, &quot;1067&quot;, &quot;918-491-6659&quot;, 
      &quot;918-523-2522&quot;, &quot;Ext&quot;, &quot;Fax&quot;, &quot;InvoiceMonths&quot;, &quot;LDC_UnitPrice_Original&quot;, 
      &quot;NULL&quot;, &quot;x2951&quot;), class = &quot;factor&quot;), X.12 = structure(c(13L, 
      1L, 1L, 1L, 1L, 1L), .Label = c(&quot;&quot;, &quot;0&quot;, &quot;100.98&quot;, &quot;202-401-3722&quot;, 
      &quot;237.02&quot;, &quot;242.33&quot;, &quot;335.04&quot;, &quot;50.6&quot;, &quot;716- 344-3303&quot;, &quot;804-504-7227&quot;, 
      &quot;913- 758-4230&quot;, &quot;919- 956-7152&quot;, &quot;email&quot;, &quot;Fax&quot;, &quot;GSA&quot;, 
      &quot;Supp_Vol&quot;), class = &quot;factor&quot;), X.13 = structure(c(10L, 2L, 
      2L, 2L, 2L, 2L), .Label = c(&quot;&quot;, &quot;1&quot;, &quot;15&quot;, &quot;202-497-6164&quot;, 
      &quot;3&quot;, &quot;804-504-7200&quot;, &quot;Emergency&quot;, &quot;MajorTypeId&quot;, &quot;NULL&quot;, 
      &quot;Status&quot;, &quot;Supp_Vol_Adj&quot;), class = &quot;factor&quot;)), .Names = c(&quot;X.5&quot;, 
  &quot;X.6&quot;, &quot;X.7&quot;, &quot;X.8&quot;, &quot;X.9&quot;, &quot;X.10&quot;, &quot;X.11&quot;, &quot;X.12&quot;, &quot;X.13&quot;), row.names = 17:22, class = &quot;data.frame&quot;)
  </code></pre>