EVOLUTION-MANAGER
Edit File: vec_detect_complete.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: Complete</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 vec_detect_complete {vctrs}"><tr><td>vec_detect_complete {vctrs}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Complete</h2> <h3>Description</h3> <p><code>vec_detect_complete()</code> detects "complete" observations. An observation is considered complete if it is non-missing. For most vectors, this implies that <code>vec_detect_complete(x) == !vec_detect_missing(x)</code>. </p> <p>For data frames and matrices, a row is only considered complete if all elements of that row are non-missing. To compare, <code>!vec_detect_missing(x)</code> detects rows that are partially complete (they have at least one non-missing value). </p> <h3>Usage</h3> <pre> vec_detect_complete(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A vector</p> </td></tr> </table> <h3>Details</h3> <p>A <a href="new_rcrd.html">record</a> type vector is similar to a data frame, and is only considered complete if all fields are non-missing. </p> <h3>Value</h3> <p>A logical vector with the same size as <code>x</code>. </p> <h3>See Also</h3> <p><code><a href="../../stats/html/complete.cases.html">stats::complete.cases()</a></code> </p> <h3>Examples</h3> <pre> x <- c(1, 2, NA, 4, NA) # For most vectors, this is identical to `!vec_detect_missing(x)` vec_detect_complete(x) !vec_detect_missing(x) df <- data_frame( x = x, y = c("a", "b", NA, "d", "e") ) # This returns `TRUE` where all elements of the row are non-missing. # Compare that with `!vec_detect_missing()`, which detects rows that have at # least one non-missing value. df2 <- df df2$all_non_missing <- vec_detect_complete(df) df2$any_non_missing <- !vec_detect_missing(df) df2 </pre> <hr /><div style="text-align: center;">[Package <em>vctrs</em> version 0.5.0 <a href="00Index.html">Index</a>]</div> </body></html>