Skip to content

Commit d11fc4b

Browse files
committed
remove statmod from suggest; update glm
1 parent 0d722fd commit d11fc4b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

R/pkg/DESCRIPTION

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ Suggests:
2121
rmarkdown,
2222
testthat,
2323
e1071,
24-
survival,
25-
statmod
24+
survival
2625
Collate:
2726
'schema.R'
2827
'generics.R'

R/pkg/R/mllib_regression.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
143143
#' the result of a call to a family function. Refer R family at
144144
#' \url{https://stat.ethz.ch/R-manual/R-devel/library/stats/html/family.html}.
145145
#' Currently these families are supported: \code{binomial}, \code{gaussian},
146-
#' \code{poisson}, \code{Gamma}, and \code{tweedie} (\code{statmod} package).
146+
#' \code{poisson}, \code{Gamma}, and \code{"tweedie"}.
147147
#' @param weightCol the weight column name. If this is not set or \code{NULL}, we treat all instance
148148
#' weights as 1.0.
149149
#' @param epsilon positive convergence tolerance of iterations.
@@ -162,8 +162,10 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
162162
#' @note glm since 1.5.0
163163
#' @seealso \link{spark.glm}
164164
setMethod("glm", signature(formula = "formula", family = "ANY", data = "SparkDataFrame"),
165-
function(formula, family = gaussian, data, epsilon = 1e-6, maxit = 25, weightCol = NULL) {
166-
spark.glm(data, formula, family, tol = epsilon, maxIter = maxit, weightCol = weightCol)
165+
function(formula, family = gaussian, data, epsilon = 1e-6, maxit = 25, weightCol = NULL,
166+
variancePower = 0.0, linkPower = 1.0 - variancePower) {
167+
spark.glm(data, formula, family, tol = epsilon, maxIter = maxit, weightCol = weightCol,
168+
variancePower = 0.0, linkPower = linkPower)
167169
})
168170

169171
# Returns the summary of a model produced by glm() or spark.glm(), similarly to R's summary().

0 commit comments

Comments
 (0)