EVOLUTION-MANAGER
Edit File: win_over.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: Generate SQL expression for window functions</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 win_over {dbplyr}"><tr><td>win_over {dbplyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate SQL expression for window functions</h2> <h3>Description</h3> <p><code>win_over()</code> makes it easy to generate the window function specification. <code>win_absent()</code>, <code>win_rank()</code>, <code>win_aggregate()</code>, and <code>win_cumulative()</code> provide helpers for constructing common types of window functions. <code>win_current_group()</code> and <code>win_current_order()</code> allow you to access the grouping and order context set up by <code><a href="../../dplyr/html/group_by.html">group_by()</a></code> and <code><a href="../../dplyr/html/arrange.html">arrange()</a></code>. </p> <h3>Usage</h3> <pre> win_over( expr, partition = NULL, order = NULL, frame = NULL, con = sql_current_con() ) win_rank(f) win_aggregate(f) win_aggregate_2(f) win_cumulative(f) win_absent(f) win_current_group() win_current_order() win_current_frame() </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>expr</code></td> <td> <p>The window expression</p> </td></tr> <tr valign="top"><td><code>order</code></td> <td> <p>Variables to order by</p> </td></tr> <tr valign="top"><td><code>frame</code></td> <td> <p>A numeric vector of length two defining the frame.</p> </td></tr> <tr valign="top"><td><code>f</code></td> <td> <p>The name of an sql function as a string</p> </td></tr> <tr valign="top"><td><code>parition</code></td> <td> <p>Variables to partition over</p> </td></tr> </table> <h3>Examples</h3> <pre> con <- simulate_dbi() win_over(sql("avg(x)"), con = con) win_over(sql("avg(x)"), "y", con = con) win_over(sql("avg(x)"), order = "y", con = con) win_over(sql("avg(x)"), order = c("x", "y"), con = con) win_over(sql("avg(x)"), frame = c(-Inf, 0), order = "y", con = con) </pre> <hr /><div style="text-align: center;">[Package <em>dbplyr</em> version 1.4.4 <a href="00Index.html">Index</a>]</div> </body></html>