Github user NarineK commented on the pull request:
https://github.com/apache/spark/pull/12836#issuecomment-221145783
Hi @thunterdb ,
Thank you for the comment. I think @sun-rui, addressed your comment also
here,
https://github.com/apache/spark/pull/12836#issuecomment-219621230
FUN in the aggregate is a built- in function such as : mean, sum etc.
Can I have smth like:
```
func <- function(x) {
y <- (data.frame(x$Species, mean(x$Sepal.Length), stringsAsFactors =
FALSE))
}
aggregate(iris, FUN=func, by=list("Species"))
```
This doesn't seem to work and R doesn't demonstrate examples on that either.
Also R speaks about FUN as " summary statistics function" for us it can be
anything applied on grouped data.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]