> On May 22, 2018, at 10:06 PM, John <miao...@gmail.com> wrote:
> 
> Hi,
> 
>   Is there any way to find the permutation function of the sorting and to
> apply the function (or its inverse) elsewhere?
> 
>   For example, the following permutation function from the sorting in the
> matrix form is
> c(1,2,3), c(2,1,3)
> 
>> sort(c("bc","ac","dd"))
> [1] "ac" "bc" "dd"
> 

I think you are asking for the `order` function.

>   I try to find it in the permutations/permute package, but I can't find it
> 
> John
> 
>       [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to