Skip to content

Instantly share code, notes, and snippets.

@akshat3096
Created May 12, 2019
Embed
What would you like to do?
data<- data.frame(variable1 = rep(LETTERS[1:3], each = 3),
variable2 = rep(paste0("factor", c(1, 2, 3)), 3),
num = 1:9)
head(data)
spread(data,variable2,num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment