Github user NarineK commented on the pull request:

    https://github.com/apache/spark/pull/12966#issuecomment-217958625
  
    Well, since the user provides the R function, I think he/she should provide 
the aggregate too. 
    Instead of providing:
    ```
    function(x) {
         data.frame(x$Species[1], mean(x$Sepal_Width), stringsAsFactors = FALSE)
     }
    ```
    
    They will provide:
    ```
    function(x) {
          data.frame(aggregate(x$Sepal_Width, by = list(x$Species), FUN = 
mean), stringsAsFactors = FALSE)
        }
    ```
    
    This is my understanding, there may be also other ways ...


---
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