R/na_predict.R

#' na_predict
#' 
#' replace `NA` values by predictions of a model
#' 
#' @param x data
#' @param object object with predict method
#' @param data data object
#' 
#' @export

na_predict <- function( x, object, data=x ) { 

  if( length(x)  != nrow(data) ) stop()
  
  return(x)
} 

Try the tidyimpute package in your browser

Any scripts or data that you put into this service are public.

tidyimpute documentation built on May 2, 2019, 3:32 p.m.