R: sort
# sorting examples using the mtcars dataset attach(mtcars) # sort by mpg newdata <- mtcars[order(mpg),] # sort by mpg and cyl newdata <- mtcars[order(mpg, cyl),] #sort by mpg (ascending) and cyl (descending) newdata <- mtcars[order(mpg, -cyl),] detach(mtcars) Pranala Menarik R
| Penerbit | Taratsa |
|---|---|
| Tahun | 2018-11-05 |
| Bahasa | ind |
| Pengenal | bookid: urn:uuid:9cc15a28-dc22-5404-8e5c-aecd8fcb5283 |