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 5069
How 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/snicksn Jul 09 '16
Thanks! Seems they are all in one column now, I get this: