r/R_Programming • u/snicksn • Jul 08 '16
Wide to long?
My head does not want to grasp the wide vs long variables.. I have a df containing:
"2010" "2011" "2012" "2013" "2014" "2015"
5007 4626 4563 4593 4677 5069How do I make it 6 observations of 2 variables instead of the below?
> str(x)
'data.frame': 1 obs. of 6 variables:
1
Upvotes
View all comments
Show parent comment
1
u/repsaj23 Jul 24 '16
I'm not sure, but hasn't the reshape2 package been succeeded by the tidyr package?