In an R data.frame I would to find the missing year by group and add a row for each missing year and repeat the last value.
An example
This is a data.frame
1. GROUP/YEAR1/YEAR2/YEAR3
2. A/100/190/na
3. A/90/na/300
4. B/200/70/na
I Want
1. GROUP/YEAR1/YEAR2/YEAR3
2. A/100/190/190
3. A/90/90/300
4. B/200/70/70