I have a data.frame that looks like the below, but need to transform it. I don't have an issue getting to the second step (gather), but am struggling to get the third. How can I get R to fill in the missing rows?
CURRENT DATA (FIRST STEP):
poe pod q20 q80 missing_rows
1: GTSTC NLBZM 25 33 7
2: CNSHA HKHKG 13 18 4
TRANSFORMED DATA (SECOND STEP):
poe pod transit
GTSTC NLBZM 25
GTSTC NLBZM 33
CNSHA HKHKG 13
CNSHA HKHKG 18
DESIRED DATA:
poe pod transit
GTSTC NLBZM 25
GTSTC NLBZM 26
GTSTC NLBZM 27
GTSTC NLBZM 28
GTSTC NLBZM 29
GTSTC NLBZM 30
GTSTC NLBZM 31
GTSTC NLBZM 32
GTSTC NLBZM 33
CNSHA HKHKG 13
CNSHA HKHKG 14
CNSHA HKHKG 15
CNSHA HKHKG 16
CNSHA HKHKG 17
CNSHA HKHKG 18