I am using R studio, mostly dplyr processing, where I have a df of users (A,B,C,...) and what day since their first visit they were active (1,2,3,...)
| user | day | active |
|---|---|---|
| A | 1 | T |
| A | 3 | T |
| B | 2 | T |
| B | 4 | T |
I would like to complete this list with all missing days - up to their current maximum value (so for user B until 4 and for user A until 3) - and value FALSE:
| user | day | active |
|---|---|---|
| A | 1 | T |
| A | 2 | F |
| A | 3 | T |
| B | 1 | F |
| B | 2 | T |
| B | 3 | F |
| B | 4 | T |
I've been googling and chewing on this for hours now. Anybody have an idea?