Description Usage Arguments Examples
top_n()
has been superseded in favour of slice_min()
/slice_max()
.
While it will not be deprecated in the near future, retirement means
that we will only perform critical bug fixes, so we recommend moving to the
newer alternatives.
top_n()
was superseded because the name was fundamentally confusing as
it returned what you might reasonably consider to be the bottom
rows. Additionally, the wt
variable had a confusing name, and strange
default (the last column in the data frame). Unfortunately we could not
see an easy way to fix the existing top_n()
function without breaking
existing code, so we created a new alternative.
1 2 3 |
x |
A data frame. |
n |
Number of rows to return for |
wt |
(Optional). The variable to use for ordering. If not specified, defaults to the last variable in the tbl. |
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.