I am trying to fill in some NA values of a string but count the NA values that are being filled.
For example I have the following string:
string = c("A", "B", "C", NA, NA, "D", "E", NA, "F", "G", NA, NA)
Expected output:
"A", "B", "C", "NA_VALUE_1", "NA_VALUE_2", "D", "E", "NA_VALUE_3", "F", "G", "NA_VALUE_4", "NA_VALUE_5"
So, I want to paste the sequence paste("NA_VALUE_", valueHere) where valueHere increases.