title: Long to wide data with tidyR?
body: <p>I have data that looks something like this</p>
  
  <pre><code>df = data.frame(name=c("A","A","B","B"),
                  group=c("g1","g2","g1","g2"),
                  V1=c(10,40,20,30),
                  V2=c(6,3,1,7))
  </code></pre>
  
  <p>I want to reshape it to look like this:</p>
  
  <pre><code>df = data.frame(name=c("A", "B"),               
                  V1.g1=c(10,20),
                  V1.g2=c(40,30),
                  V2.g1=c(6,1),
                  V2.g2=c(3,7))
  </code></pre>
  
  <p>Is it possible to do it with tidyR?</p>
  
  <p>I can do it with reshape</p>
  
  <pre><code>reshape(df, idvar='name', timevar='group', direction='wide')
  </code></pre>
  
  <p>but is always good to learn something new.</p>