Github user shivaram commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12836#discussion_r67266001
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1266,6 +1266,83 @@ setMethod("dapplyCollect",
                 ldf
               })
     
    +#' gapply
    +#'
    +#' Group the SparkDataFrame using the specified columns and apply the R 
function to each
    +#' group.
    +#'
    +#' @param x A SparkDataFrame
    +#' @param cols Grouping columns
    +#' @param func A function to be applied to each group partition specified 
by grouping
    +#'             column of the SparkDataFrame. The function `func` takes as 
argument
    +#'             a key - grouping columns and a data frame - a local R 
data.frame.
    +#'             The output of `func` is a local R data.frame.
    +#' @param schema The schema of the resulting SparkDataFrame after the 
function is applied.
    --- End diff --
    
    Yeah thats fine. Also in the example below where we construct `schema` you 
can add a comment line which looks like `Here our output contains 2 columns, 
the key which is a integer and the mean which is a double`. 


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

Reply via email to