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

    https://github.com/apache/spark/pull/8908#discussion_r40457173
  
    --- Diff: R/pkg/R/DataFrame.R ---
    @@ -1848,3 +1848,28 @@ setMethod("crosstab",
                 sct <- callJMethod(statFunctions, "crosstab", col1, col2)
                 collect(dataFrame(sct))
               })
    +
    +
    +#' This function downloads the contents of a DataFrame into an R's 
data.frame.
    +#' Since data.frames are held in memory, ensure that you have enough memory
    +#' in your system to accommodate the contents.
    +#' 
    +#' @title Download data from a DataFrame into a data.frame
    +#' @param x a DataFrame
    +#' @return a data.frame
    +#' @rdname as.data.frame
    +#' @examples \dontrun{
    +#' 
    +#' irisDF <- createDataFrame(sqlContext, iris)
    +#' df <- as.data.frame(irisDF[irisDF$Species == "setosa", ])
    +#' }
    +setGeneric("as.data.frame")
    +setMethod(f = "as.data.frame", signature = "DataFrame", definition =
    --- End diff --
    
    Minor style comments -- To keep this similar to the other methods in this 
function I think this can be 
    ```
    setMethod("as.data.frame",
                       signature(x = "DataFrame"),
                       function(x, ...) {
    }
    ```


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