I'm trying to rearrange a dataframe with two variables so that each date for each identifier is in subsequent order, and then I want to pad the missing 10 months between them. It looks like this:
Date LPERMNO
<date> <dbl>
1 1962-06-01 10225
2 1962-06-01 10233
3 1962-06-01 11164
4 1962-06-01 12079
5 1962-06-01 12706
....
2019-05-01 90805
2 2019-05-01 90806
3 2019-05-01 91822
4 2019-05-01 92536
5 2019-05-01 92602
6 2019-05-01 92778
I have tried:
`MagicPort3 <- MagicPort3 %>%
group_by(Date) %>%
arrange(LPERMNO) %>%
group_by(LPERMNO) %>%
arrange(Date)`
and then padding by month
but I can never get them to be in clean order. It is supposed to look like this: Ordered Dataframe
Thanks