EVOLUTION-MANAGER
Edit File: negate.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: Negate a predicate function.</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 negate {purrr}"><tr><td>negate {purrr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Negate a predicate function.</h2> <h3>Description</h3> <p>Negate a predicate function. </p> <h3>Usage</h3> <pre> negate(.p) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>.p</code></td> <td> <p>A single predicate function, a formula describing such a predicate function, or a logical vector of the same length as <code>.x</code>. Alternatively, if the elements of <code>.x</code> are themselves lists of objects, a string indicating the name of a logical element in the inner lists. Only those elements where <code>.p</code> evaluates to <code>TRUE</code> will be modified.</p> </td></tr> </table> <h3>Value</h3> <p>A new predicate function. </p> <h3>Examples</h3> <pre> negate("x") negate(is.null) negate(~ .x > 0) x <- transpose(list(x = 1:10, y = rbernoulli(10))) x %>% keep("y") %>% length() x %>% keep(negate("y")) %>% length() # Same as x %>% discard("y") %>% length() </pre> <hr /><div style="text-align: center;">[Package <em>purrr</em> version 0.3.4 <a href="00Index.html">Index</a>]</div> </body></html>