Skip to content

Commit

Permalink
Merge pull request apache#137 from shivaram/fix-docs
Browse files Browse the repository at this point in the history
Fix documentation for includePackage
  • Loading branch information
concretevitamin committed Jan 28, 2015
2 parents 7549f88 + 0df0e18 commit 9c0637a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/R/context.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ parallelize <- function(sc, coll, numSlices = 1) {
#'
#' sc <- sparkR.init()
#' # Include the matrix library we will be using
#' includePackage(Matrix)
#' includePackage(sc, Matrix)
#'
#' generateSparse <- function(x) {
#' sparseMatrix(i=c(1, 2, 3), j=c(1, 2, 3), x=c(1, 2, 3))
Expand Down
18 changes: 9 additions & 9 deletions pkg/man/includePackage.Rd
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{includePackage}
\alias{includePackage}
\title{Include this specified package on all workers}
\usage{
includePackage(sc, pkg)
}
\arguments{
\item{sc}{SparkContext to use}
\item{sc}{SparkContext to use}

\item{pkg}{Package name}
\item{pkg}{Package name}
}
\description{
This function can be used to include a package on all
workers before the user's code is executed. This is useful
in scenarios where other R package functions are used in a
function passed to functions like \code{lapply}. NOTE: The
package is assumed to be installed on every node in the
Spark cluster.
This function can be used to include a package on all workers before the
user's code is executed. This is useful in scenarios where other R package
functions are used in a function passed to functions like \code{lapply}.
NOTE: The package is assumed to be installed on every node in the Spark
cluster.
}
\examples{
\dontrun{
library(Matrix)
sc <- sparkR.init()
# Include the matrix library we will be using
includePackage(Matrix)
includePackage(sc, Matrix)
generateSparse <- function(x) {
sparseMatrix(i=c(1, 2, 3), j=c(1, 2, 3), x=c(1, 2, 3))
Expand Down

0 comments on commit 9c0637a

Please sign in to comment.