I\'m struggling with generating a variable for my current project. I\'m using R version 4.0.1 on Windows.
I have unbalanced panel data in a