Comments (4)
Issue
> options(warnPartialMatchArgs = TRUE)
> example("deparse", package = "base")
[...]
Warning message:
In deparse(args(lm), width = 500) :
partial argument match of 'width' to 'width.cutoff'
Action
- Bug report with patch filed: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17341
- Update 2017-09-18: Patch was turned down with the argument that
width
is unique since there's no...
involved in this particular function.
from wishlist-for-r.
Following your twitter comment, I think this would detect any examples that don't play well partial arguments
test_example = function(function_name) {
x = try(example(function_name, package = "stats", character.only = TRUE,
echo = FALSE, ask = FALSE, local = TRUE),
silent = TRUE)
if(class(x) == "try-error") return(function_name)
else return(NULL)
}
options(warn=2)
options(warnPartialMatchArgs = TRUE)
tpkg = "stats"
funcs = getNamespaceExports(tpkg)
bad_funcs = sapply(funcs, test_example)
as.vector(unlist(bad_funcs))
Also, even though local = TRUE
and ask = FALSE
my workspace is still filled up with "stuff" and I'm occasionally asked.
from wishlist-for-r.
> getRversion()
[1] ‘3.6.0’
options(warnPartialMatchDollar = TRUE, warn = 2L)
library(survival)
si <- sessionInfo()
utils::toLatex(si)
Error: (converted from warning) partial match of 'otherPkg' to 'otherPkgs'
> traceback()
8: doWithOneRestart(return(expr), restart)
7: withOneRestart(expr, restarts[[1L]])
6: withRestarts({
.Internal(.signalCondition(simpleWarning(msg, call), msg,
call))
.Internal(.dfltWarn(msg, call))
}, muffleWarning = function() NULL)
5: .signalSimpleWarning("partial match of 'otherPkg' to 'otherPkgs'",
base::quote(NULL))
4: vapply(pdList, `[[`, "", "Version")
3: toLatexPDlist(object$otherPkg)
2: toLatex.sessionInfo(si)
1: utils::toLatex(si)
from wishlist-for-r.
From https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17767:
> library(nlme)
> fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
+ correlation = corAR1(form = ~ 1 | Mare),
+ weights = varIdent(form=~Mare))
> s <- summary(fm1)
> bfr <- utils::capture.output(print(s))
Warning message:
In coef.varIdent(x, uncons = FALSE, allCoef = TRUE) :
partial argument match of 'uncons' to 'unconstrained'
> options(warn = 2L)
> bfr <- print(s)
> traceback()
12: doWithOneRestart(return(expr), restart)
11: withOneRestart(expr, restarts[[1L]])
10: withRestarts({
.Internal(.signalCondition(simpleWarning(msg, call), msg,
call))
.Internal(.dfltWarn(msg, call))
}, muffleWarning = function() NULL)
9: .signalSimpleWarning("partial argument match of 'uncons' to 'unconstrained'",
base::quote(coef.varIdent(x, uncons = FALSE, allCoef = TRUE)))
8: coef(x, uncons = FALSE, allCoef = TRUE)
7: print.summary.varFunc(X[[i]], ...)
6: FUN(X[[i]], ...)
5: lapply(x, print, ...)
4: print.summary.modelStruct(summary(x$modelStruct), ...)
3: print(summary(x$modelStruct), ...)
2: print.summary.gls(s)
1: print(s)
So, this comes from calling nlme:::coef.varIdent()
;
> args(nlme:::coef.varIdent)
function (object, unconstrained = TRUE, allCoef = FALSE, ...)
with partial argument names in:
> nlme:::print.summary.varFunc
function (x, header = TRUE, ...)
{
ox <- x
class(x) <- attr(x, "oClass")
if (length(aux <- coef(x, uncons = FALSE, allCoef = TRUE)) >
0) {
if (header)
cat("Variance function:\n")
cat(paste(" Structure: ", attr(x, "structName"), "\n",
sep = ""))
cat(paste(" Formula:", deparse(formula(x)), "\n"))
cat(" Parameter estimates:\n")
print(aux)
}
else {
if (inherits(x, "varIdent")) {
return()
}
cat("Variance function structure of class", class(x)[1],
"with no parameters, or uninitialized\n")
}
invisible(ox)
}
<bytecode: 0x55feea606078>
<environment: namespace:nlme>
from wishlist-for-r.
Related Issues (20)
- Allow subdirectories in the R directory (R packages) HOT 6
- .DollarNames auto completion inside brackets
- Drop inconsolata as default code font in pdf vignettes
- Support for decorators HOT 5
- Have a global option to change the temporary directory HOT 2
- Underscore `_` as digit separator HOT 2
- bug in setting `warnPartialMatchDollar`? HOT 9
- WISH: Add an R option to control argument 'type' of demo(..., type = c("console", "html"))
- WISH: allow for longer file path lengths under Windows HOT 3
- docstrings HOT 8
- CONSISTENCY: Add CLI argument --expr=EXPR complementing -e EXPR
- WISH: attr() allows to provide a default fallback value HOT 4
- Rscript -e EXPR fails to launch if stdin is closed HOT 3
- Suggested performance improvements in R HOT 1
- Separate Build-depends: from Suggests: in DESCRIPTION files HOT 9
- Allow setting breakpoints from debugger
- WISH: `drop` = FALSE by default for `[.data.frame` HOT 9
- Fast check for discreteness
- Make UTF-8 the default encoding for package metadata HOT 2
- WISH/ROBUSTNESS: Mechanism to prevent var <<- value from assigning non-existing 'var' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wishlist-for-r.