EVOLUTION-MANAGER
Edit File: complete.cases.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: Find Complete Cases</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 complete.cases {stats}"><tr><td>complete.cases {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find Complete Cases</h2> <h3>Description</h3> <p>Return a logical vector indicating which cases are complete, i.e., have no missing values. </p> <h3>Usage</h3> <pre> complete.cases(...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>a sequence of vectors, matrices and data frames.</p> </td></tr> </table> <h3>Value</h3> <p>A logical vector specifying which observations/rows have no missing values across the entire sequence. </p> <h3>Note</h3> <p>A current limitation of this function is that it uses low level functions to determine lengths and missingness, ignoring the class. This will lead to spurious errors when some columns have classes with <code><a href="../../base/html/length.html">length</a></code> or <code><a href="../../base/html/NA.html">is.na</a></code> methods, for example <code>"<a href="../../base/html/DateTimeClasses.html">POSIXlt</a>"</code>, as described in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16648">PR#16648</a>. </p> <h3>See Also</h3> <p><code><a href="../../base/html/NA.html">is.na</a></code>, <code><a href="na.fail.html">na.omit</a></code>, <code><a href="na.fail.html">na.fail</a></code>. </p> <h3>Examples</h3> <pre> x <- airquality[, -1] # x is a regression design matrix y <- airquality[, 1] # y is the corresponding response stopifnot(complete.cases(y) != is.na(y)) ok <- complete.cases(x, y) sum(!ok) # how many are not "ok" ? x <- x[ok,] y <- y[ok] </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>