EVOLUTION-MANAGER
Edit File: arrange.tbl_lazy.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: Arrange rows by variables in a remote database table</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 arrange.tbl_lazy {dbplyr}"><tr><td>arrange.tbl_lazy {dbplyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Arrange rows by variables in a remote database table</h2> <h3>Description</h3> <p>Order rows of database tables by an expression involving its variables. </p> <h3>Usage</h3> <pre> ## S3 method for class 'tbl_lazy' arrange(.data, ..., .by_group = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>.data</code></td> <td> <p>A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See <em>Methods</em>, below, for more details.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Variables, or functions or variables. Use desc() to sort a variable in descending order.</p> </td></tr> <tr valign="top"><td><code>.by_group</code></td> <td> <p>If <code>TRUE</code>, will sort first by grouping variable. Applies to grouped data frames only.</p> </td></tr> </table> <h3>Value</h3> <p>An object of the same class as <code>.data</code>. </p> <h3>Missing values</h3> <p>Compared to its sorting behaviour on local data, the <code><a href="../../dplyr/html/arrange.html">arrange()</a></code> method for most database tables sorts NA at the beginning unless wrapped with <code><a href="../../desc/html/desc.html">desc()</a></code>. Users can override this behaviour by explicitly sorting on <code>is.na(x)</code>. </p> <h3>Examples</h3> <pre> library(dplyr) dbplyr::memdb_frame(a = c(3, 4, 1, 2)) %>% arrange(a) # NA sorted first dbplyr::memdb_frame(a = c(3, 4, NA, 2)) %>% arrange(a) # override by sorting on is.na() first dbplyr::memdb_frame(a = c(3, 4, NA, 2)) %>% arrange(is.na(a), a) </pre> <hr /><div style="text-align: center;">[Package <em>dbplyr</em> version 1.4.4 <a href="00Index.html">Index</a>]</div> </body></html>