EVOLUTION-MANAGER
Edit File: vars_pull.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: Select variable</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 vars_pull {tidyselect}"><tr><td>vars_pull {tidyselect}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Select variable</h2> <h3>Description</h3> <p>This function powers <code><a href="../../dplyr/html/pull.html">dplyr::pull()</a></code> and various functions of the tidyr package. It is similar to <code><a href="vars_select.html">vars_select()</a></code> but returns only one column name and has slightly different semantics: it allows negative numbers to select columns from the end. </p> <h3>Usage</h3> <pre> vars_pull(vars, var = -1) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>vars</code></td> <td> <p>A character vector of existing column names.</p> </td></tr> <tr valign="top"><td><code>var</code></td> <td> <p>A variable specified as: </p> <ul> <li><p> a literal variable name </p> </li> <li><p> a positive integer, giving the position counting from the left </p> </li> <li><p> a negative integer, giving the position counting from the right. </p> </li></ul> <p>The default returns the last column (on the assumption that's the column you've created most recently). </p> <p>This argument is taken by expression and supports <a href="../../rlang/html/quasiquotation.html">quasiquotation</a> (you can unquote column names and column locations).</p> </td></tr> </table> <h3>Value</h3> <p>The selected column name as an unnamed string. </p> <h3>See Also</h3> <p><code><a href="../../dplyr/html/pull.html">dplyr::pull()</a></code>, <code><a href="vars_select.html">vars_select()</a></code> </p> <h3>Examples</h3> <pre> # It takes its argument by expression: vars_pull(letters, c) # Negative numbers select from the end: vars_pull(letters, -3) # You can unquote variables: var <- 10 vars_pull(letters, !! var) </pre> <hr /><div style="text-align: center;">[Package <em>tidyselect</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>