I have the following simple dataframe. I would like to find a clean tidyverse solution to decompose each sequence by row into its subsequences. I think it will be very clear what I mean when you see the examples. This is the starting code.
data.frame(acct=c(100467,100783,101233),
x1=c(4,2,4),
x2=c(3,3,4),
x3=c(2,4,4))
It produces the following output:

I would like to modify it so that it produces basically the output of the following code:
data.frame(acct=c(100467,100467,100467,100783,100783,100783),
x1=c(4,4,4,2,2,2),
x2=c(3,3,NA,3,3,NA),
x3=c(2,NA,NA,4,NA,NA))
Which gives me the following console output:
What is the cleanest simplest way to accomplish this in the tidyverse? The data frame contains many more sequences to be decomposed.
