Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugzilla#18710] Turn on warnPartialMatch* by default #165

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c70cdeb
turn on warnPartialMatch* by default
MichaelChirico Apr 22, 2024
ea02dfd
cvp$just --> cvp$justification
MichaelChirico Apr 24, 2024
1afedf0
$coef --> $coefficients
MichaelChirico Apr 24, 2024
5a515cf
expr= --> exprs=
MichaelChirico Apr 24, 2024
cd9990b
edit in goldens
MichaelChirico Apr 24, 2024
ad2ed56
more found during compilation of datasets
MichaelChirico Apr 24, 2024
6835613
length= --> length.out=
MichaelChirico Apr 24, 2024
83ac892
partial matches in tests/arith-true.R
MichaelChirico Apr 24, 2024
e24848f
partial matches in tests/lm-tests.R
MichaelChirico Apr 24, 2024
f83604b
more partial match issues in tests/d-p-q-r-tests.R
MichaelChirico Apr 24, 2024
461c52e
even more in d-p-q-r-tests.R
MichaelChirico Apr 24, 2024
25eba0a
re-sync w goldens
MichaelChirico Apr 24, 2024
a2ea503
partial match issues in tests/complex.R
MichaelChirico Apr 24, 2024
cd59ae9
partial match issues in tests/lapack.R
MichaelChirico Apr 24, 2024
8018489
partial match issues in tests/print-tests.R
MichaelChirico Apr 24, 2024
ba464d9
partial match issues in tests/reg-tests-1{a,b}
MichaelChirico Apr 24, 2024
c90c571
partial matching in tests/reg-tests-1{c,d}.R
MichaelChirico Apr 24, 2024
2a87975
partial matching issues in tests/reg-tests-{1e,2}.R
MichaelChirico Apr 24, 2024
4b36f74
disable reg-tests for now given .Rout discrepancy
MichaelChirico Apr 24, 2024
e67cce8
view->viewports= in grid
MichaelChirico Apr 25, 2024
8494de5
full->fullNames= in tests
MichaelChirico Apr 25, 2024
24cd878
tol->tolerance= in stats tests
MichaelChirico Apr 25, 2024
aed64bd
fix issues in demo, intro, etc
MichaelChirico Apr 25, 2024
e36762c
another batch
MichaelChirico Apr 26, 2024
c8dc57d
update goldens, and one more issue
MichaelChirico Apr 26, 2024
59014e4
straggler
MichaelChirico Apr 26, 2024
c9cde3f
revert parts to be excluded from patch
MichaelChirico Apr 26, 2024
e1d6d3a
error: prcomp() has tol, not tolerance
MichaelChirico Apr 26, 2024
f1d5554
Rout.save exists here, inconsistently
MichaelChirico Apr 26, 2024
6fb6dcb
missed more partial matches in .R too
MichaelChirico Apr 26, 2024
6192ebf
another iteration of make check locally
MichaelChirico Apr 26, 2024
132bcc0
another error, and another intentional partial match
MichaelChirico Apr 26, 2024
3f7207f
another iteration
MichaelChirico Apr 26, 2024
b5bd327
another iteration
MichaelChirico Apr 26, 2024
7eb829c
sync again
MichaelChirico Apr 26, 2024
baead9c
one more
MichaelChirico Apr 26, 2024
c2e77cf
next iteration
MichaelChirico Apr 26, 2024
6018d46
next iteration
MichaelChirico Apr 26, 2024
945d089
next iteration
MichaelChirico Apr 26, 2024
39e2303
next iteration
MichaelChirico Apr 26, 2024
d502018
mistake: dpois() mysteriously has log=, not log.p=
MichaelChirico Apr 26, 2024
92ddef8
mistake: dt() mysteriously has log=, not log.p=
MichaelChirico Apr 26, 2024
f234e4e
next iteration
MichaelChirico Apr 26, 2024
2602432
mistake: i guess all d*() density functions use log=
MichaelChirico Apr 26, 2024
4a02077
next iteration
MichaelChirico Apr 26, 2024
10199db
next iteration
MichaelChirico Apr 26, 2024
11fbd0f
next iteration
MichaelChirico Apr 26, 2024
1e9445e
next iteration
MichaelChirico Apr 26, 2024
6c2119b
next iteration
MichaelChirico Apr 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions doc/manual/R-intro.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ seq(2,10)
all(seq(1,30) == seq(to=30, from=1))

seq(-5, 5, by=.2) -> s3
s4 <- seq(length=51, from=-5, by=.2)
s4 <- seq(length.out=51, from=-5, by=.2)
all.equal(s3,s4)

s5 <- rep(x, times=5)
Expand Down Expand Up @@ -145,7 +145,7 @@ x[i] <- 0 # Replace those elements by zeros.
x

n <- 60
b <- 5 ; blocks <- rep(1:b, length= n)
b <- 5 ; blocks <- rep(1:b, length.out= n)
v <- 6 ; varieties <- gl(v,10)

Xb <- matrix(0, n, b)
Expand All @@ -163,7 +163,7 @@ all(N == table(blocks,varieties))
h <- 1:17
Z <- array(h, dim=c(3,4,2))
## If the size of 'h' is exactly 24
h <- rep(h, length = 24)
h <- rep(h, length.out = 24)
Z. <- Z ## the result is the same as
Z <- h; dim(Z) <- c(3,4,2)
stopifnot(identical(Z., Z))
Expand Down Expand Up @@ -324,7 +324,7 @@ hist(eruptions)

## <IMG> postscript("images/hist.eps", ...)
# make the bins smaller, make a plot of density
hist(eruptions, seq(1.6, 5.2, 0.2), prob=TRUE)
hist(eruptions, seq(1.6, 5.2, 0.2), probability=TRUE)
lines(density(eruptions, bw=0.1))
rug(eruptions) # show the actual data points
## dev.off() <IMG/>
Expand Down Expand Up @@ -393,7 +393,7 @@ plot(ecdf(B), do.points=FALSE, verticals=TRUE, add=TRUE)
###--- @appendix A sample session

## "Simulate starting a new R session, by
rm(list=ls(all=TRUE))
rm(list=ls(all.names=TRUE))
set.seed(123) # for repeatability

if(interactive())
Expand All @@ -410,7 +410,7 @@ dummy <- data.frame(x = x, y = x + rnorm(x)*w)
dummy
fm <- lm(y ~ x, data=dummy)
summary(fm)
fm1 <- lm(y ~ x, data=dummy, weight=1/w^2)
fm1 <- lm(y ~ x, data=dummy, weights=1/w^2)
summary(fm1)
attach(dummy)
lrf <- lowess(x, y)
Expand Down Expand Up @@ -444,7 +444,7 @@ anova(fm0, fm)
detach()
rm(fm, fm0)

x <- seq(-pi, pi, len=50)
x <- seq(-pi, pi, length.out=50)
y <- x
f <- outer(x, y, function(x, y) cos(y)/(1 + x^2))
oldpar <- par(no.readonly = TRUE)
Expand All @@ -457,7 +457,7 @@ par(oldpar)
image(x, y, f)
image(x, y, fa)
objects(); rm(x, y, f, fa)
th <- seq(-pi, pi, len=100)
th <- seq(-pi, pi, length.out=100)
z <- exp(1i*th)
par(pty="s")
plot(z, type="l")
Expand Down
2 changes: 1 addition & 1 deletion src/library/base/demo/error.catching.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ withWarnings <- function(expr) {
withWarnings({ warning("first"); warning("2nd"); pi })

r <- withWarnings({ log(-1) + sqrt(-4); exp(1) })
str(r, digits=14)
str(r, digits.d=14)

##' @title tryCatch *all* warnings and messages, and an error or the final value
##' @param expr an \R expression to evaluate
Expand Down
8 changes: 4 additions & 4 deletions src/library/base/demo/is.things.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xtraBaseNms <- c("last.dump", "last.warning", ".Last.value",
".Random.seed", ".Traceback")
ls.base <- Filter(function(nm) is.na(match(nm, xtraBaseNms)),
ls("package:base", all=TRUE))
ls("package:base", all.names=TRUE))
base.is.f <- sapply(ls.base, function(x) is.function(get(x)))
cat("\nNumber of all base objects:\t", length(ls.base),
"\nNumber of functions from these:\t", sum(base.is.f),
Expand Down Expand Up @@ -129,9 +129,9 @@ is0
ispi <- unlist(is.ALL(pi))
all(ispi[is0.ok] == is0)

is.ALL(numeric(0), true=TRUE)
is.ALL(array(1,1:3), true=TRUE)
is.ALL(cbind(1:3), true=TRUE)
is.ALL(numeric(0), true.only=TRUE)
is.ALL(array(1,1:3), true.only=TRUE)
is.ALL(cbind(1:3), true.only=TRUE)

is.ALL(structure(1:7, names = paste("a",1:7,sep="")))
is.ALL(structure(1:7, names = paste("a",1:7,sep="")), true.only = TRUE)
Expand Down
2 changes: 1 addition & 1 deletion src/library/datasets/data/iris.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Petal.Width = c(0.2, 0.2, 0.2, 0.2, 0.2, 0.4, 0.3, 0.2,
2.2, 2.3, 1.5, 2.3, 2, 2, 1.8, 2.1, 1.8, 1.8, 1.8, 2.1, 1.6, 1.9, 2, 2.2,
1.5, 1.4, 2.3, 2.4, 1.8, 1.8, 2.1, 2.4, 2.3, 1.9, 2.3, 2.5, 2.3, 1.9, 2,
2.3, 1.8),
Species = gl(3,50, label = c("setosa", "versicolor", "virginica")))
Species = gl(3,50, labels = c("setosa", "versicolor", "virginica")))
2 changes: 1 addition & 1 deletion src/library/datasets/data/state.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ factor(c(4, 9, 8, 5, 9, 8, 1, 3, 3, 3, 9, 8, 6, 6, 7, 7, 4, 5,
factor(c(2, 4, 4, 2, 4, 4, 1, 2, 2, 2, 4, 4, 3, 3, 3, 3, 2, 2,
1, 2, 1, 3, 3, 2, 3, 4, 3, 4, 1, 1, 4, 1, 2, 3, 3, 2, 4, 1, 1, 2, 3, 2,
2, 4, 1, 2, 4, 2, 3, 4), levels=1:4,
label = c("Northeast", "South", "North Central", "West"))
labels = c("Northeast", "South", "North Central", "West"))

"state.x77" <-
structure(c(3615, 365, 2212, 2110, 21198, 2541, 3100, 579, 8277, 4931,
Expand Down
2 changes: 1 addition & 1 deletion src/library/graphics/demo/graphics.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ rect(usr[1], usr[3], usr[2], usr[4], col="cornsilk", border="black")
lines(x, col="blue")
points(x, pch=21, bg="lightcyan", cex=1.25)
axis(2, col.axis="blue", las=1)
axis(1, at=1:12, lab=month.abb, col.axis="blue")
axis(1, at=1:12, labels=month.abb, col.axis="blue")
box()
title(main= "The Level of Interest in R", font.main=4, col.main="red")
title(xlab= "1996", col.lab="red")
Expand Down
20 changes: 10 additions & 10 deletions src/library/grid/R/group.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ finaliseGroup <- function(x) {
##
## Justification of the current viewport must also be preserved
## so that transformation on group use is calculated correctly.
hjust <- resolveHJust(cvp$just, cvp$hjust)
vjust <- resolveVJust(cvp$just, cvp$vjust)
hjust <- resolveHJust(cvp$justification, cvp$hjust)
vjust <- resolveVJust(cvp$justification, cvp$vjust)
pushViewport(viewport(hjust, vjust,
just=c(hjust, vjust),
mask="none",
Expand All @@ -40,8 +40,8 @@ finaliseGroup <- function(x) {
if (is.grob(x$dst)) {
destination <- function() {
cvp <- current.viewport()
hjust <- resolveHJust(cvp$just, cvp$hjust)
vjust <- resolveVJust(cvp$just, cvp$vjust)
hjust <- resolveHJust(cvp$justification, cvp$hjust)
vjust <- resolveVJust(cvp$justification, cvp$vjust)
pushViewport(viewport(hjust, vjust,
just=c(hjust, vjust),
mask="none",
Expand Down Expand Up @@ -80,11 +80,11 @@ recordGroup <- function(x, ref) {
group <- list(ref=ref,
## Record location, size, angle for re-use in
## different viewport
xy=deviceLoc(unit(resolveHJust(cvp$just, cvp$hjust), "npc"),
unit(resolveVJust(cvp$just, cvp$vjust), "npc"),
xy=deviceLoc(unit(resolveHJust(cvp$justification, cvp$hjust), "npc"),
unit(resolveVJust(cvp$justification, cvp$vjust), "npc"),
valueOnly=TRUE, device=TRUE),
xyin=deviceLoc(unit(resolveHJust(cvp$just, cvp$hjust), "npc"),
unit(resolveVJust(cvp$just, cvp$vjust), "npc"),
xyin=deviceLoc(unit(resolveHJust(cvp$justification, cvp$hjust), "npc"),
unit(resolveVJust(cvp$justification, cvp$vjust), "npc"),
valueOnly=TRUE, device=FALSE),
wh=c(convertX(unit(1, "npc"), "in", valueOnly=TRUE),
convertY(unit(1, "npc"), "in", valueOnly=TRUE)),
Expand Down Expand Up @@ -134,8 +134,8 @@ defnTranslate <- function(group, inverse=FALSE, device=TRUE) {

useTranslate <- function(inverse=FALSE, device=TRUE) {
cvp <- current.viewport()
xy <- deviceLoc(unit(resolveHJust(cvp$just, cvp$hjust), "npc"),
unit(resolveVJust(cvp$just, cvp$vjust), "npc"),
xy <- deviceLoc(unit(resolveHJust(cvp$justification, cvp$hjust), "npc"),
unit(resolveVJust(cvp$justification, cvp$vjust), "npc"),
valueOnly=TRUE, device=device)
if (inverse) {
groupTranslate(-xy$x, -xy$y)
Expand Down
72 changes: 36 additions & 36 deletions src/library/grid/tests/testls.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,103 +28,103 @@ grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child1")),
###########
# Plain viewport
grid.ls(viewport(name="vp1"),
view=TRUE)
viewports=TRUE)
# vpList
grid.ls(vpList(viewport(name="vpl1")),
view=TRUE)
viewports=TRUE)
grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2")),
view=TRUE)
viewports=TRUE)
grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2"),
viewport(name="vpl3")),
view=TRUE)
viewports=TRUE)
# vpStack
grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2")),
view=TRUE)
viewports=TRUE)
grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2"),
viewport(name="vps3")),
view=TRUE)
viewports=TRUE)
# vpTrees
grid.ls(vpTree(viewport(name="parentvp"), vpList(viewport(name="childvp"))),
view=TRUE)
viewports=TRUE)
grid.ls(vpTree(viewport(name="parentvp"),
vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
view=TRUE)
viewports=TRUE)
# vpPaths
grid.ls(vpPath("A"),
view=TRUE)
viewports=TRUE)
grid.ls(vpPath("A", "B"),
view=TRUE)
viewports=TRUE)
grid.ls(vpPath("A", "B", "C"),
view=TRUE)
viewports=TRUE)

##########
# MIXTURES
##########
# grob with vp viewport
g1 <- grob(vp=viewport(name="gvp"), name="g1")
grid.ls(g1, view=TRUE, full=TRUE)
grid.ls(g1, view=TRUE, full=TRUE, grob=FALSE)
grid.ls(g1, viewports=TRUE, fullNames=TRUE)
grid.ls(g1, viewports=TRUE, fullNames=TRUE, grobs=FALSE)
# grob with vp vpList
grid.ls(grob(vp=vpList(viewport(name="vpl")), name="g1"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(grob(vp=vpList(viewport(name="vpl1"), viewport(name="vpl2")),
name="g1"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
# grob with vp vpStack
grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2")),
name="g1"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2"),
viewport(name="vps3")),
name="g1"),
view=TRUE)
viewports=TRUE)
# grob with vp vpTree
grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
vpList(viewport(name="cvp"))),
name="g1"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
name="g1"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
# gTree with vp viewport
# and child grob with vp viewport
grid.ls(gTree(children=gList(grob(vp=viewport(name="childvp"), name="cg1"),
grob(name="cg2")),
name="parent",
vp=viewport(name="parentvp")),
view=TRUE)
viewports=TRUE)
# gTree with childrenvp viewport
grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
view=TRUE, full=TRUE, grob=FALSE)
viewports=TRUE, fullNames=TRUE, grobs=FALSE)
grid.ls(gTree(children=gList(grob(name="child")),
name="parent",
childrenvp=viewport(name="vp")),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
name="parent",
childrenvp=viewport(name="vp")),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(gTree(children=gList(grob(name="child")),
childrenvp=viewport(name="vp"),
name="parent"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
name="parent",
childrenvp=viewport(name="vp")),
view=TRUE, full=TRUE, grob=FALSE)
viewports=TRUE, fullNames=TRUE, grobs=FALSE)
# gTree with childrenvp vpTree
grid.ls(gTree(childrenvp=vpTree(parent=viewport(name="vp1"),
children=vpList(viewport(name="vp2"))),
name="gtree"),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
grid.ls(gTree(children=gList(grob(name="child")),
name="parent",
childrenvp=vpTree(parent=viewport(name="vp1"),
children=vpList(viewport(name="vp2")))),
view=TRUE, full=TRUE)
viewports=TRUE, fullNames=TRUE)
# gTree with childrenvp vpTree
# and child grob with vp vpPath
# A gTree, called "parent", with childrenvp vpTree (vp2 within vp1)
Expand All @@ -135,24 +135,24 @@ sampleGTree <- gTree(name="parent",
children=vpList(viewport(name="vp2"))))
grid.ls(sampleGTree)
# Show viewports too
grid.ls(sampleGTree, view=TRUE)
grid.ls(sampleGTree, viewports=TRUE)
# Only show viewports
grid.ls(sampleGTree, view=TRUE, grob=FALSE)
grid.ls(sampleGTree, viewports=TRUE, grobs=FALSE)
# Alternate displays
# nested listing, custom indent
grid.ls(sampleGTree, view=TRUE, print=nestedListing, gindent="--")
grid.ls(sampleGTree, viewports=TRUE, print=nestedListing, gindent="--")
# path listing
grid.ls(sampleGTree, view=TRUE, print=pathListing)
grid.ls(sampleGTree, viewports=TRUE, print=pathListing)
# path listing, without grobs aligned
grid.ls(sampleGTree, view=TRUE, print=pathListing, gAlign=FALSE)
grid.ls(sampleGTree, viewports=TRUE, print=pathListing, gAlign=FALSE)
# grob path listing
grid.ls(sampleGTree, view=TRUE, print=grobPathListing)
grid.ls(sampleGTree, viewports=TRUE, print=grobPathListing)
# path listing, grobs only
grid.ls(sampleGTree, print=pathListing)
# path listing, viewports only
grid.ls(sampleGTree, view=TRUE, grob=FALSE, print=pathListing)
grid.ls(sampleGTree, viewports=TRUE, grobs=FALSE, print=pathListing)
# raw flat listing
str(grid.ls(sampleGTree, view=TRUE, print=FALSE))
str(grid.ls(sampleGTree, viewports=TRUE, print=FALSE))



Loading
Loading