[R] A problem with order() function in R

Jesadaporn Pupantragul jp.beckmcs at gmail.com
Tue Jul 18 04:58:19 CEST 2017


Hello r-help
I am learning R and use R-studio.
I create vector x <- c(19,17,23,11) and use function order(x).
The result show [1]  4 2 1 3. Why it doesn't show [1] 3 2 4 1.
Follow picture that i attach.
Thank you for you answer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot (5).png
Type: image/png
Size: 68434 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170718/2df88884/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot (6).png
Type: image/png
Size: 145778 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170718/2df88884/attachment-0001.png>


More information about the R-help mailing list