Github user felixcheung commented on the pull request:

    https://github.com/apache/spark/pull/8920#issuecomment-144621929
  
    I think @sun-rui does have a point here. Generally in R, `sort` is for list 
& vector
    https://stat.ethz.ch/R-manual/R-devel/library/base/html/sort.html
    
    But for data.frame, `order` is used (in base) (or `arrange` in dplyr)
    
http://stackoverflow.com/questions/1296646/how-to-sort-a-dataframe-by-columns
    http://www.cookbook-r.com/Manipulating_data/Sorting/
    http://www.dummies.com/how-to/content/how-to-sort-data-frames-in-r.html
    
    And IMO ordering with Column is actually more R-like
    ```
    df[ order(df$weight, decreasing=TRUE), ]
    df[ order(-df$weight), ]
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to