title: Using melt function and getting error: names do not match previous names
body: <p>I created a dataframe with names</p>
  
  <pre><code>[1] "promotion"  "code"       "01.09.2016" "01.16.2016" "01.23.2016" "01.30.2016" "02.06.2016" "02.13.2016" "02.20.2016" "02.27.2016" "03.05.2016"
  [12] "03.12.2016" "03.19.2016" "03.26.2016" "04.02.2016" "04.09.2016" "04.16.2016" "04.23.2016" "04.30.2016" "05.07.2016" "05.14.2016" "05.21.2016"
  [23] "05.28.2016" "06.04.2016" "06.11.2016" "06.18.2016" "06.25.2016" "07.02.2016" "07.09.2016" "07.16.2016" "07.23.2016" "07.30.2016" "08.06.2016"
  [34] "08.13.2016" "08.20.2016" "08.27.2016" "09.03.2016" "09.10.2016" "09.17.2016" "09.24.2016" "10.01.2016" "10.08.2016" "10.15.2016" "10.22.2016"
  [45] "10.29.2016" "11.05.2016" "11.12.2016" "11.19.2016" "11.26.2016" "12.03.2016" "12.10.2016" "12.17.2016" "12.24.2016" "12.31.2016"
  </code></pre>
  
  <p>I used this code</p>
  
  <pre><code>melt(Scanning_Cost, names(Scanning_Cost)[1:2])
  </code></pre>
  
  <p>this error shows</p>
  
  <pre><code>Error in match.names(clabs, names(xi)) : 
    names do not match previous names
  </code></pre>
  
  <p>I want my date columns to come in front of the products and show the count</p>
  
  <pre><code>promotion   code `01.09.2016` `01.16.2016` `01.23.2016` `01.30.2016` `02.06.2016` `02.13.2016` `02.20.2016` `02.27.2016`
                                &lt;chr&gt;  &lt;chr&gt;        &lt;lgl&gt;        &lt;lgl&gt;        &lt;lgl&gt;        &lt;lgl&gt;        &lt;dbl&gt;        &lt;dbl&gt;        &lt;dbl&gt;        &lt;dbl&gt;
  1   D - MA BEACH WAVES MOUSSE 8.5OZ 372548           NA           NA           NA           NA            1            1            1            1
  2 M/A 100% COCONUT OIL JAR     10OZ 968701           NA           NA           NA           NA            1            1            1            1
  3 M/A BYE FRIZZ 30DAY KRTN SMT3.38Z 178685           NA           NA           NA           NA            1            1            1            1
  4 M/A BYE GRY TMP SPRY L/M BRN1.5OZ 373984           NA           NA           NA           NA            1            1            1            1
  5 M/A BYE GRY TMP SPRY M/D B/B1.5OZ 373985           NA           NA           NA           NA            1            1            1            1
  6 M/A COCO CREAM CRL CD       8.4OZ 968704           NA           NA           NA           NA            1            1            1            1
  </code></pre>