powered by
Fills missing data where known by other observations with the same id/index
repaint(df, id, var)
A dataframe
a dataframe
a string identifying a column in the dataframe for indexing
a string identifying a column or columns in the dataframe to be filled
# \donttest{ data <- data.frame(ID = c(1,2,3,3,2,1), One = c(1,NA,3,NA,2,NA), Two = c(NA,"B",NA,"C",NA,"A")) repaint(data, "ID", c("One","Two")) # }
Run the code above in your browser using DataLab