GitHub user felixcheung opened a pull request:
https://github.com/apache/spark/pull/19557
[SPARK-22281][SPARKR] Handle R method breaking signature changes
## What changes were proposed in this pull request?
This is to fix the code for the latest R changes in R-devel
```
hecking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'attach':
attach
Code: function(what, pos = 2L, name = deparse(substitute(what),
backtick = FALSE), warn.conflicts = TRUE)
Docs: function(what, pos = 2L, name = deparse(substitute(what)),
warn.conflicts = TRUE)
Mismatches in argument default values:
Name: 'name' Code: deparse(substitute(what), backtick = FALSE) Docs:
deparse(substitute(what))
Codoc mismatches from documentation object 'glm':
glm
Code: function(formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart, offset,
control = list(...), model = TRUE, method = "glm.fit",
x = FALSE, y = TRUE, singular.ok = TRUE, contrasts =
NULL, ...)
Docs: function(formula, family = gaussian, data, weights, subset,
na.action, start = NULL, etastart, mustart, offset,
control = list(...), model = TRUE, method = "glm.fit",
x = FALSE, y = TRUE, contrasts = NULL, ...)
Argument names in code not in docs:
singular.ok
Mismatches in argument names:
Position: 16 Code: singular.ok Docs: contrasts
Position: 17 Code: contrasts Docs: ...
```
With attach, we need to match the signature of base::attach, since it
changes we are going to generate the signature at runtime by pulling from
base::attach directly.
With glm it's pulling in the function definition (ie. "usage") from the
stats::glm function. Since this is "compiled in" when we build the source
package into the .Rd file, when it changes at runtime or in CRAN check it won't
match the latest signature. The solution is not to pull in from stats::glm
since there isn't much value in doing that (none of the param we actually use,
the ones we do use we have explicitly documented them)
## How was this patch tested?
Manually.
- [ ] check on other platform, r-hub, on r-devel etc..
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/felixcheung/spark rattachglmdocerror
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19557.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19557
----
commit 7b145bac854851e4a87935c80b3688513eb58cb7
Author: Felix Cheung <[email protected]>
Date: 2017-10-23T07:17:43Z
fix attach and glm
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]