Displaying 2 results from an estimated 2 matches for "diettype_1".
Did you mean:
diettype_2
2018 Feb 25
0
reshaping column items into rows per unique ID
...f
2 a
3 j
4 c
4 c
4 f",
header=TRUE,stringsAsFactors=FALSE)
library(prettyR)
stretch_df(a1df,"CustomerID","DietType")
CustomerID DietType_1 DietType_2 DietType_3
1 1 a c b
2 2 f a <NA>
3 3 j <NA> <NA>
4 4 c c f
Jim
On Sun, Feb 25, 2018 at 11:59 PM, Allaisone 1 <allaisone1 at hotm...
2018 Feb 25
4
reshaping column items into rows per unique ID
Hi All
I have a datafram which looks like this :
CustomerID DietType
1 a
1 c
1 b
2 f
2 a
3 j
4 c
4 c
4 f
And I would like to reshape this so I can