EVOLUTION-MANAGER
Edit File: fields.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: Tools for accessing the fields of a record.</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 fields {vctrs}"><tr><td>fields {vctrs}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Tools for accessing the fields of a record.</h2> <h3>Description</h3> <p>A <a href="new_rcrd.html">rcrd</a> behaves like a vector, so <code>length()</code>, <code>names()</code>, and <code>$</code> can not provide access to the fields of the underlying list. These helpers do: <code>fields()</code> is equivalent to <code>names()</code>; <code>n_fields()</code> is equivalent to <code>length()</code>; <code>field()</code> is equivalent to <code>$</code>. </p> <h3>Usage</h3> <pre> fields(x) n_fields(x) field(x, i) field(x, i) <- value </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A <a href="new_rcrd.html">rcrd</a>, i.e. a list of equal length vectors with unique names.</p> </td></tr> </table> <h3>Examples</h3> <pre> x <- new_rcrd(list(x = 1:3, y = 3:1, z = letters[1:3])) n_fields(x) fields(x) field(x, "y") field(x, "y") <- runif(3) field(x, "y") </pre> <hr /><div style="text-align: center;">[Package <em>vctrs</em> version 0.5.0 <a href="00Index.html">Index</a>]</div> </body></html>