I have the following set of data:
The rows in Yellow is an example of a good situation, because for Vaer=B both Var2=F and Var2=G a freq value is present.
But, rows in red are example of a bad situation, because row 13 where Var2=F have freq value at date 07.02.2018 but I do not have a value for Var2=G at the same date.
On the other hand, row 27 in red, I have freq value for Var2=G at date 04:02:2018 but I do not have freq value for Var2=F at the same date.
What I need is: For all type of Var1 (A, B, ..) and For each Var2 (F, G) If freq is present in Var2=F but not in Var2=G create for Var2=G freq=0 at the same date.
The same have to be mabe for Var2=G where Var2=F is not present.
Could you give me some idea how to do that in R?