I have a data frame shown below
Hair Eye Freq
1 Black Brown 32
2 Brown Brown 53
3 Red Brown 10
4 Blond Brown 3
5 Red Blue 10
6 Blond Blue 30
7 Black Hazel 10
8 Blond Hazel 5
In the above data frame frequency of 4 hair colors Black, Brown, Red and Blond
are noted across different eye colors Brown, Blue and Hazel
. However, I would like to fill in the missing hair color frequency for respective eye color so that it results in a data frame as below. Any help is appreciated.
Hair Eye Freq
1 Black Brown 32
2 Brown Brown 53
3 Red Brown 10
4 Blond Brown 3
5 Black Blue 0
6 Brown Blue 0
7 Red Blue 10
8 Blond Blue 30
9 Black Hazel 10
10 Brown Hazel 0
11 Red Hazel 0
12 Blond Hazel 5