packrat/lib/x86_64-apple-darwin15.6.0/3.6.0/tidyr/demo/so-16032858.R

# http://stackoverflow.com/questions/16032858
library(tidyr)
library(dplyr)

results <- data.frame(
  Ind = paste0("Ind", 1:10),
  Treatment = rep(c("Treat", "Cont"), each = 10),
  value = 1:20
)

results %>% spread(Treatment, value)
adnaniazi/krauseNiazi2019Analyses documentation built on June 9, 2019, 7:22 p.m.