O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Missing values complete!

When you are satisfied that the imputation has been performed correctly:

  • Assign the temporary dataframe back into the PimaIndians dataframe
  • Count the number of NAs in each row

The output of the head function shows NAs no longer exist. If there are still NAs, a row will be printed:

PimaIndians <- df head(PimaIndians[rowSums(is.na(PimaIndians)) > 0, ])  

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required