Posts by William • 31 points
1 post
-
3
votes1
answer3317
viewsQ: How to turn rows into columns, when the number of rows is variable in R
I have a data frame that way: And I need him to stay that way: The variable that defines the column can be calculated according to the image below The sequence starts with each id change, in excel…