numvec <- c(NA, 1:5, NA, NA, NA, 10:12, NA)
newgroup <- c(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0)
fill(numvec)
fill(numvec, newgroup)
charvec <- c("", letters[1:5], "", "", "", letters[10:12], "")
fill(charvec)
Run the code above in your browser using DataLab