Description Usage Arguments Details Value See Also Examples
Order the rows in a dataset.
1 2 3 4 |
x |
a dataset object. |
decreasing |
whether to sort in decreasing order. |
... |
ignored. |
The sort.dataset
function converts its argument to a dataset and then
sorts its rows. With decreasing = FALSE
, the default, sorts rows in
decreasing order; otherwise it sorts in increasing order.
The xtfrm.dataset
function converts its argument to a dataset
and then returns a numerical vector which is ordered in the same way
as the rows of x
.
In both cases, to determine the sort order, these functions first
transform vector-like columns of x
via xtfrm
, and
they transform matrix-like columns via xtfrm.dataset
. Since
xtfrm
is not defined for list columns, both sort.dataset
and xtfrm.dataset
raise an error if x
has a list column.
For sort
, a dataset with the rows of x
ordered in
ascending or descending order according to whether decreasing
is
FALSE
.
For xtfrm
, a numeric vector with entries in the same order
as the rows of x
.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.