Github user shivaram commented on a diff in the pull request: https://github.com/apache/spark/pull/8864#discussion_r40580851 --- Diff: R/pkg/R/DataFrame.R --- @@ -946,15 +946,36 @@ setMethod("foreachPartition", ############################## SELECT ################################## -getColumn <- function(x, c) { - column(callJMethod(x@sdf, "col", c)) -} +#' Select a column +#' +#' Selects column based on the column name and return it as a Column. +#' Note that the column name can also reference to a nested column like `a.b`. +#' +#' @param x A SparkSQL DataFrame +#' +#' @rdname select +#' @name col +#' @aliases col +#' @export +#' @examples +#'\dontrun{ +#' sc <- sparkR.init() +#' sqlContext <- sparkRSQL.init(sc) +#' df <- createDataFrame(sqlContext, list(50, 60, 70), "age") +#' col(df, "age") +#'} +setMethod("col", --- End diff -- Yeah but in terms of exporting this I'm not sure we need another method for the users ?
--- 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