EVOLUTION-MANAGER
Edit File: na.warn.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Handle missing values with a warning</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for na.warn {modelr}"><tr><td>na.warn {modelr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Handle missing values with a warning</h2> <h3>Description</h3> <p>This NA handler ensures that those models that support the <code>na.action</code> parameter do not silently drop missing values. It wraps around <code><a href="../../stats/html/na.exclude.html">stats::na.exclude()</a></code> so that there is one prediction/residual for input row. To apply it globally, run <code>options(na.action = na.warn)</code>. </p> <h3>Usage</h3> <pre> na.warn(object) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>A data frame</p> </td></tr> </table> <h3>Examples</h3> <pre> df <- tibble::tibble( x = 1:10, y = c(5.1, 9.7, NA, 17.4, 21.2, 26.6, 27.9, NA, 36.3, 40.4) ) # Default behaviour is to silently drop m1 <- lm(y ~ x, data = df) resid(m1) # Use na.action = na.warn to warn m2 <- lm(y ~ x, data = df, na.action = na.warn) resid(m2) </pre> <hr /><div style="text-align: center;">[Package <em>modelr</em> version 0.1.8 <a href="00Index.html">Index</a>]</div> </body></html>