title: How to reshape data to long format?
body: <p>I have a .csv file like this:</p>
  
  <pre><code>+-------+---------+------+-------+
  | CONN  |  TABLE  | COLS | OWNER |
  +-------+---------+------+-------+
  | ONE   | TABLE_A |   10 | MIKE  |
  | ONE   | TABLE_B |    9 | MIKE  |
  | ONE   | TAB_A   |   11 | KIM   |
  | ONE   | TAB_B   |   14 | KIM   |
  | TWO   | TABLE_A |    9 | MIKE  |
  | TWO   | TABLE_B |    9 | MIKE  |
  | TWO   | TAB_A   |   11 | KIM   |
  | TWO   | TAB_D   |   56 | KIM   |
  | THREE | TABLE_A |    9 | MIKE  |
  | THREE | TABLE_C |    3 | MIKE  |
  | THREE | TABLE_D |   11 | KIM   |
  | THREE | TAB_A   |   11 | KIM   |
  +-------+---------+------+-------+
  </code></pre>
  
  <p>I want to compare tables and cols by conn and owner. How can I reshape this data to make this comparison? My data is here:</p>
  
  <pre><code>dat &lt;- structure(list(CONN = c("ONE", "ONE", "ONE", "ONE", "TWO", "TWO", 
  "TWO", "TWO", "THREE", "THREE", "THREE", "THREE"), TABLE = c("TABLE_A", 
  "TABLE_B", "TAB_A", "TAB_B", "TABLE_A", "TABLE_B", "TAB_A", "TAB_D", 
  "TABLE_A", "TABLE_C", "TABLE_D", "TAB_A"), COLS = c(10L, 9L, 
  11L, 14L, 9L, 9L, 11L, 56L, 9L, 3L, 11L, 11L), OWNER = c("MIKE", 
  "MIKE", "KIM", "KIM", "MIKE", "MIKE", "KIM", "KIM", "MIKE", "MIKE", 
  "KIM", "KIM")), .Names = c("CONN", "TABLE", "COLS", "OWNER"), class = "data.frame", row.names = c(NA, 
  -12L))
  </code></pre>
  
  <p>I tried something like:</p>
  
  <pre><code>reshape(dat, varying=c('TABLE', 'COLS'), v.names=C('CONN', 'OWNER'), direction='long')
  Error in C("CONN", "OWNER") : object not interpretable as a factor
  </code></pre>