Skip to content

Commit 12a2e2a

Browse files
junyangqshivaram
authored andcommitted
[SPARKR][MINOR] Fix docs for sparkR.session and count
## What changes were proposed in this pull request? This PR tries to add some more explanation to `sparkR.session`. It also modifies doc for `count` so when grouped in one doc, the description doesn't confuse users. ## How was this patch tested? Manual test. ![screen shot 2016-09-02 at 1 21 36 pm](https://cloud.githubusercontent.com/assets/15318264/18217198/409613ac-7110-11e6-8dae-cb0c8df557bf.png) Author: Junyang Qian <[email protected]> Closes #14942 from junyangq/fixSparkRSessionDoc. (cherry picked from commit d2fde6b) Signed-off-by: Shivaram Venkataraman <[email protected]>
1 parent c0ea770 commit 12a2e2a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

R/pkg/R/functions.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ setMethod("cosh",
444444

445445
#' Returns the number of items in a group
446446
#'
447-
#' Returns the number of items in a group. This is a column aggregate function.
447+
#' This can be used as a column aggregate function with \code{Column} as input,
448+
#' and returns the number of items in a group.
448449
#'
449450
#' @rdname count
450451
#' @name count

R/pkg/R/group.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setMethod("show", "GroupedData",
5757

5858
#' Count
5959
#'
60-
#' Count the number of rows for each group.
60+
#' Count the number of rows for each group when we have \code{GroupedData} input.
6161
#' The resulting SparkDataFrame will also contain the grouping columns.
6262
#'
6363
#' @return A SparkDataFrame.

R/pkg/R/sparkR.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ sparkRHive.init <- function(jsc = NULL) {
314314

315315
#' Get the existing SparkSession or initialize a new SparkSession.
316316
#'
317-
#' Additional Spark properties can be set (...), and these named parameters take priority over
318-
#' over values in master, appName, named lists of sparkConfig.
317+
#' SparkSession is the entry point into SparkR. \code{sparkR.session} gets the existing
318+
#' SparkSession or initializes a new SparkSession.
319+
#' Additional Spark properties can be set in \code{...}, and these named parameters take priority
320+
#' over values in \code{master}, \code{appName}, named lists of \code{sparkConfig}.
319321
#'
320322
#' For details on how to initialize and use SparkR, refer to SparkR programming guide at
321323
#' \url{http://spark.apache.org/docs/latest/sparkr.html#starting-up-sparksession}.

0 commit comments

Comments
 (0)