My dataframe looks like
df <- data.frame(Role = c("a","a","b", "b", "c", "c"), Men = c(1,0,3,1,2,4), Women = c(2,1,1,4,3,1))
df.melt <- melt(df)
I only have access to the version that looks like df.melt, how to I get it in the df form?
Useing dcast just gets me errors I cant figure out the syntax of it.