EVOLUTION-MANAGER
Edit File: new_grouped_df.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: Low-level construction and validation for the grouped_df...</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 new_grouped_df {dplyr}"><tr><td>new_grouped_df {dplyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Low-level construction and validation for the grouped_df class</h2> <h3>Description</h3> <p><code>new_grouped_df()</code> is a constructor designed to be high-performance so only check types, not values. This means it is the caller's responsibility to create valid values, and hence this is for expert use only. </p> <p><code>validate_grouped_df()</code> validates the attributes of a <code>grouped_df</code>. </p> <h3>Usage</h3> <pre> new_grouped_df(x, groups, ..., class = character()) validate_grouped_df(x, check_bounds = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A data frame</p> </td></tr> <tr valign="top"><td><code>groups</code></td> <td> <p>The grouped structure, <code>groups</code> should be a data frame. Its last column should be called <code>.rows</code> and be a list of 1 based integer vectors that all are between 1 and the number of rows of <code>.data</code>.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional attributes</p> </td></tr> <tr valign="top"><td><code>class</code></td> <td> <p>additional class, will be prepended to canonical classes of a grouped data frame.</p> </td></tr> <tr valign="top"><td><code>check_bounds</code></td> <td> <p>whether to check all indices for out of bounds problems in grouped_df objects</p> </td></tr> </table> <h3>Examples</h3> <pre> # 5 bootstrap samples tbl <- new_grouped_df( tibble(x = rnorm(10)), groups = tibble(".rows" := replicate(5, sample(1:10, replace = TRUE), simplify = FALSE)) ) # mean of each bootstrap sample summarise(tbl, x = mean(x)) </pre> <hr /><div style="text-align: center;">[Package <em>dplyr</em> version 1.0.2 <a href="00Index.html">Index</a>]</div> </body></html>