title: R transpose data set by group of variables
body: <p>my data set look like this </p>
  
  <pre><code>name  attribute  value
  Tom    age        20
  Tom    height     80
  Tom    weight     100
  Jack   age        22
  Jack   height     90
  Jack   weight     110 
  </code></pre>
  
  <p>and I want to get a data set like this</p>
  
  <pre><code>       Tom   Jack
  age     20    22
  height  80    90
  weight  100   110
  </code></pre>
  
  <p>should be pretty stragiht forward in SAS by transpose of two variables
  but it is not so in R , how can I do it ? I tried melt and transpose , but failed ....</p>
  
  <pre><code>df1 &lt;- read.table(header = TRUE, stringsAsFactors = FALSE,
             text = "name  attribute  value
  Tom    age        20
             Tom    height     80
             Tom    weight     100
             Jack   age        22
             Jack   height     90
             Jack   weight     110 ")
  </code></pre>