Last updated on 2022-04-24 03:53:02 CEST.
Package | ERROR | NOTE | OK |
---|---|---|---|
gdiff | 12 | ||
gggrid | 12 | ||
gridBase | 12 | ||
gridBezier | 12 | ||
gridGeometry | 12 | ||
gridGraphics | 12 | ||
gridSVG | 1 | 11 | |
grImport2 | 1 | 11 | |
hexView | 12 | ||
metapost | 12 | ||
rasterize | 12 | ||
RGraphics | 2 | 10 | |
roloc | 12 | ||
rolocISCCNBS | 7 | 5 | |
vwline | 12 |
Current CRAN status: OK: 12
Current CRAN status: OK: 12
Current CRAN status: NOTE: 12
Version: 0.4-7
Check: DESCRIPTION meta-information
Result: NOTE
Malformed Description field: should contain one or more complete sentences.
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64
Current CRAN status: OK: 12
Current CRAN status: OK: 12
Current CRAN status: OK: 12
Current CRAN status: ERROR: 1, OK: 11
Version: 1.7-4
Check: tests
Result: ERROR
Running ‘testanimate.R’ [1s/1s]
Running ‘testattrib.R’ [1s/1s]
Running ‘testball.R’ [1s/2s]
Running ‘testclasses.R’ [1s/1s]
Running ‘testclippath.R’ [1s/1s]
Running ‘testcomment.R’ [1s/1s]
Running ‘testelement.R’ [1s/1s]
Running ‘testfilter.R’ [1s/1s]
Running ‘testforce.R’ [1s/1s]
Running ‘testgradientfill.R’ [1s/1s]
Running ‘testgrid.R’ [1s/1s]
Running ‘testid.R’ [1s/1s]
Running ‘testlink.R’ [1s/1s]
Running ‘testmask.R’ [1s/1s]
Running ‘testpath.R’ [1s/2s]
Running ‘testpatternfill.R’ [1s/1s]
Running ‘testpendulum.R’ [1s/1s]
Running ‘testplot.R’ [1s/2s]
Running ‘testplotmath.R’ [1s/1s]
Running ‘testpolyline.R’ [1s/1s]
Running ‘testprefix.R’ [1s/1s]
Running ‘testrotate.R’ [1s/1s]
Running ‘testsvg.R’ [1s/1s]
Running ‘testtransparency.R’ [1s/1s]
Running ‘testvp.R’ [1s/1s]
Running the tests in ‘tests/testanimate.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # animValues
>
> animValue(letters[1:4])
$t1
[1] "a"
$t2
[1] "b"
$t3
[1] "c"
$t4
[1] "d"
> animValue(letters[1:4], timeid=rep(1:2, 2))
$t1
[1] "a" "c"
$t2
[1] "b" "d"
> animValue(letters[1:4], id=rep(1:2, 2))
$id1
$id1$t1
[1] "a"
$id1$t2
[1] "c"
$id2
$id2$t1
[1] "b"
$id2$t2
[1] "d"
>
> as.animValue(letters[1:4])
$t1
[1] "a"
$t2
[1] "b"
$t3
[1] "c"
$t4
[1] "d"
> as.animValue(matrix(letters[1:12], ncol=4))
$id1
$id1$t1
[1] "a"
$id1$t2
[1] "b"
$id1$t3
[1] "c"
$id2
$id2$t1
[1] "d"
$id2$t2
[1] "e"
$id2$t3
[1] "f"
$id3
$id3$t1
[1] "g"
$id3$t2
[1] "h"
$id3$t3
[1] "i"
$id4
$id4$t1
[1] "j"
$id4$t2
[1] "k"
$id4$t3
[1] "l"
> as.animValue(matrix(letters[1:12], ncol=4), multVal=TRUE)
$t1
[1] "a" "b" "c"
$t2
[1] "d" "e" "f"
$t3
[1] "g" "h" "i"
$t4
[1] "j" "k" "l"
> as.animValue(list(letters[1:3], letters[4:6]))
$id1
$id1$t1
[1] "a"
$id1$t2
[1] "b"
$id1$t3
[1] "c"
$id2
$id2$t1
[1] "d"
$id2$t2
[1] "e"
$id2$t3
[1] "f"
> as.animValue(list(letters[1:3], letters[4:6]), multVal=TRUE)
$t1
[1] "a" "b" "c"
$t2
[1] "d" "e" "f"
>
> # animUnits
>
> animUnit(unit(1:4, "npc"))
$t1
[1] 1npc
$t2
[1] 2npc
$t3
[1] 3npc
$t4
[1] 4npc
> animUnit(unit(1:4, "npc"), timeid=rep(1:2, 2))
$t1
[1] 1npc 3npc
$t2
[1] 2npc 4npc
> animUnit(unit(1:4, "npc"), id=rep(1:2, 2))
$id1
$id1$t1
[1] 1npc
$id1$t2
[1] 3npc
$id2
$id2$t1
[1] 2npc
$id2$t2
[1] 4npc
>
> as.animUnit(1:4, "npc")
$t1
[1] 1npc
$t2
[1] 2npc
$t3
[1] 3npc
$t4
[1] 4npc
> as.animUnit(unit(1:4, "npc"))
$t1
[1] 1npc
$t2
[1] 2npc
$t3
[1] 3npc
$t4
[1] 4npc
> as.animUnit(matrix(1:12, ncol=4), "in")
$id1
$id1$t1
[1] 1inches
$id1$t2
[1] 2inches
$id1$t3
[1] 3inches
$id2
$id2$t1
[1] 4inches
$id2$t2
[1] 5inches
$id2$t3
[1] 6inches
$id3
$id3$t1
[1] 7inches
$id3$t2
[1] 8inches
$id3$t3
[1] 9inches
$id4
$id4$t1
[1] 10inches
$id4$t2
[1] 11inches
$id4$t3
[1] 12inches
> as.animUnit(matrix(1:12, ncol=4), "in", multVal=TRUE)
$t1
[1] 1inches 2inches 3inches
$t2
[1] 4inches 5inches 6inches
$t3
[1] 7inches 8inches 9inches
$t4
[1] 10inches 11inches 12inches
> as.animUnit(list(unit(1:3, "npc"), unit(4:6, "in")))
$id1
$id1$t1
[1] 1npc
$id1$t2
[1] 2npc
$id1$t3
[1] 3npc
$id2
$id2$t1
[1] 4inches
$id2$t2
[1] 5inches
$id2$t3
[1] 6inches
> as.animUnit(list(unit(1:3, "npc"), unit(4:6, "in")), multVal=TRUE)
$t1
[1] 1npc 2npc 3npc
$t2
[1] 4inches 5inches 6inches
>
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
>
> grid.rect(name="rect",
+ x=0,
+ y=0,
+ just=c("left", "bottom"))
> grid.animate("rect", x=unit(0:30, "mm"), duration=5, rep=TRUE)
> grid.circle(name="circle",
+ x=unit(0.5, "npc") + unit(0, "mm"),
+ r=unit(10, "mm"))
> grid.animate("circle", x=unit(0.5, "npc") + unit(0:30, "mm"),
+ duration=5, rep=TRUE)
> grid.text("hello", name="text1",
+ x=unit(0.3, "npc") + unit(0, "mm"))
> grid.animate("text1",
+ x=unit(0.3, "npc") + unit(0:30, "mm"),
+ duration=5, rep=TRUE)
> grid.text("hello", name="text2",
+ x=unit(0.3, "npc") + unit(0, "mm"),
+ y=unit(0.3, "npc") + unit(0, "mm"))
> grid.animate("text2",
+ x=unit(0.3, "npc") + unit(0:30, "mm"),
+ y=unit(0.3, "npc") + unit(0:30, "mm"),
+ duration=5, rep=TRUE)
>
> popViewport()
>
> grid.export("animate.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testattrib.R’ failed.
Complete output:
>
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # A very simple test
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots1.pdf")
> # Test script chunk
> grid.script(file="test.script")
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
> grid.circle(r=0.1, gp=gpar(fill="red"), name="circgrob")
> # Test setting SVG attribute
> grid.garnish("circgrob", onclick="circle_click(evt)")
> popViewport()
>
> grid.export()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testball.R’ failed.
Complete output:
> library(grid)
> library(lattice)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> postscript(width=8, height=6, paper="special")
>
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
>
> y <- 1:4
> x <- 1:4
> g <- factor(c("Earth", "Moon", "Jupiter", "Mars"))
>
> n <- 30
> d <- 20 # metres
> k <- c(9.8, 1.6, 24.8, 3.7) # gravities
> times <- 2 * sqrt(d/k) # (twice) the time taken to fall d metres
>
> cx <- unit(rep(0.5, 2*n - 1), "npc")
> dy <- 10*seq(0, 2, length=n)^2
> ecy <- unit(40 - c(dy, rev(dy)[-1]), "native")
>
> ballpanel <- function(x, y, subscripts) {
+ pushViewport(viewport(yscale=c(-10, 50)))
+ grid.rect(y=unit(0, "npc"),
+ height=unit(10, "native"),
+ just="bottom",
+ gp=gpar(fill="grey"))
+ duration <- switch(subscripts,
+ times[1],
+ times[2],
+ times[3],
+ times[4])
+ col <- switch(subscripts,
+ "blue", "grey", "brown", "red")
+ grid.circle(name=col,
+ x=cx[1],
+ y=ecy[1],
+ # r=unit(2, "mm"),
+ r=unit(1, "native"),
+ gp=gpar(col="black", fill=col))
+ grid.animate(col, x=cx, y=ecy, duration=duration, rep=TRUE)
+ if (subscripts == 1) {
+ grid.text("20 metres",
+ x=unit(-1, "lines"),
+ y=unit(20, "native"),
+ just="bottom", rot=270)
+ grid.lines(x=unit(-1, "lines"),
+ y=unit.c(unit(0, "native"),
+ unit(20, "native") -
+ unit(0.5, "strwidth", "40 metres") -
+ unit(2, "mm")))
+ grid.lines(x=unit(c(-.75, -1.25), "lines"),
+ y=unit(0, "native"))
+ grid.lines(x=unit(-1, "lines"),
+ y=unit.c(unit(40, "native"),
+ unit(20, "native") +
+ unit(0.5, "strwidth", "40 metres") +
+ unit(2, "mm")))
+ grid.lines(x=unit(c(-.75, -1.25), "lines"),
+ y=unit(40, "native"))
+ }
+ popViewport()
+ }
>
> print(xyplot(y ~ x | g, subscripts=TRUE,
+ layout=c(4, 1),
+ xlab=NULL, ylab=NULL,
+ panel=ballpanel,
+ scales=list(draw=FALSE)),
+ position=c(0.1, 0.1, 0.9, 0.9),
+ newpage=FALSE)
>
> popViewport()
>
> grid.export("ball.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testclasses.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
>
> pushViewport(viewport())
> grid.rect()
> grid.circle()
> grid.text("hello, world!")
> popViewport()
>
> # All grobs and viewports should now be exported with a class attribute
> # holding the value of their R class()
> grid.export("test-classes.svg", addClasses = TRUE)
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testclippath.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
>
> # Create the definition of a clipping path, in this case
> # it will just be a circle.
> cp <- clipPath(circleGrob(r = 0.3))
>
> # Register the clipping path so that we can refer to it and apply it.
> registerClipPath("circleClip", cp)
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: registerClipPath -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testcomment.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots2.pdf")
> grid.rect(name = "mainrect")
> grid.comment("This is a comment", "mainrect")
> grid.export("comment-test.svg")
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.export ... primToDev.rect -> getID -> prefixName -> paste0 -> escapeSelector
In addition: Warning message:
In grabDL(warn, wrap, wrap.grobs, ...) :
one or more grobs overwritten (grab WILL not be faithful; try 'wrap.grobs = TRUE')
Execution halted
Running the tests in ‘tests/testelement.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots3.pdf")
> grid.element("test")
> grid.element("testParent",
+ children = gList(commentGrob("This is a child comment"),
+ elementGrob("firstChild"),
+ rectGrob(),
+ elementGrob("thirdChild",
+ attrs = list(anAttrib = "value"))))
> # Create a 'title' element with descriptive text
> grid.element("title", children = gList(
+ textNodeGrob("A gridSVG image with customised SVG content")))
> grid.export("element-test.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'element' in selecting a method for function 'devStartElement': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testfilter.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # There are many filter effect primitives and many of them are
> # quite complex so this file could end up having plenty more tests!
>
> pdf(file = NULL)
>
> # First, lets draw some text that we're then going to filter
> grid.text("hello, world!", gp = gpar(fontsize = 96),
+ name = "backtext")
> # Draw a copy over the top with white text that will be left alone
> grid.text("hello, world!", gp = gpar(fontsize = 96, col = "white"),
+ name = "foretext")
>
> # We want to create a filter that takes the text thicker, and then blurs it
> f <- filterEffect(list(feMorphology(operator = "dilate",
+ radius = unit(1, "mm")),
+ feGaussianBlur(sd = 1)))
> # Apply the filter
> grid.filter("backtext", f)
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.filter ... registerFilter -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testforce.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> x <- roundrectGrob(width=.8, height=.8, name="x", gp=gpar(lwd=5))
>
> grid.newpage()
> grid.draw(x)
> grid.gradientFill("x", linearGradient(c("green", "yellow")))
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.gradientFill ... registerGradientFill -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testgradientfill.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
>
> # Define a linear gradient
> lg <- linearGradient(col = c("blue", "red"))
> # Register it
> registerGradientFill("lingrad", lg)
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: registerGradientFill -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testgrid.R’ failed.
Complete output:
> # Try to reproduce testsvg.R from grid
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots4.pdf")
> # Force white background and black foreground
> pushViewport(viewport(gp=gpar(col="black", fill="white")))
> grid.rect()
> # NOTE: that svg.R has transforms that assume that (0, 0)
> # is at bottom-left so y-locations and heights in "native"
> # coordinates on an X11 device are not
> # handled properly (by svg.R; grid draws them fine).
> # So for the outer viewport, we fudge an approximation to the
> # "pixel" locations in testsvg.R
> # Ultimate fix requires something in svg.R transforms (ty and th)
> # Also, the viewport pushed above means that the "native"
> # device coordinates are no longer available here
> pushViewport(viewport(unit(1, "mm"), unit(1, "mm"),
+ unit(0.5, "npc"), unit(0.6, "npc"),
+ just=c("left", "bottom"),
+ xscale=c(0, 11), yscale=c(0, 11)))
> grid.rect(gp=gpar(col="green"))
> grid.lines(1:10, 10:1,
+ default.units="native",
+ gp=gpar(col="green"))
> grid.polygon(c(1, 3, 4, 1), c(1, 1, 5, 4),
+ default.units="native",
+ gp=gpar(fill="grey", col=NA))
> grid.rect(rep(6, 2), c(3, 7), 2, 1,
+ just=c("left", "bottom"),
+ default.units="native",
+ gp=gpar(fill="cyan"))
> grid.text(c("some text", "some more text!"), 2, 8:7,
+ just="left",
+ default.units="native")
> grid.circle(rep(8, 2), 3, c(.1, 2),
+ default.units="native",
+ gp=gpar(col="blue", fill=NA))
> grid.text("centred text", 4, 5,
+ default.units="native", rot=20)
> pushViewport(viewport(x=6, y=5, w=3, h=1,
+ default.units="native",
+ just=c("left", "bottom"),
+ xscale=c(0, 1), yscale=c(0, 1)))
> grid.rect(0, 0, 1, 1,
+ just=c("left", "bottom"),
+ default.units="native",
+ gp=gpar(fill=NA, col="black"))
> grid.text("text in a box", 0.1, 0.5,
+ just=c("left", "bottom"),
+ default.units="native")
> popViewport()
> grid.rect(5, 2, 2, 7,
+ default.units="native",
+ just=c("left", "bottom"),
+ gp=gpar(fill="green", alpha=.5))
> popViewport()
>
> popViewport()
>
> grid.export("grid.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testid.R’ failed.
Complete output:
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # A very simple test
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots5.pdf")
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
> grid.circle(r=4:1/8, name="circgrob")
> grid.rect(name="rectgrob")
> popViewport()
>
> grid.export()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testlink.R’ failed.
Complete output:
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # A very simple test
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots6.pdf")
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
> grid.text("Click me", name="txtgrob")
> grid.hyperlink("txtgrob", href="http://cran.stat.auckland.ac.nz")
> popViewport()
>
> grid.export()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testmask.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
>
> # Create the definition of an opacity mask, in this case
> # it will just be a circle with a gradient fill.
> rg <- radialGradient(col = c("white", "black"))
> m <- mask(gradientFillGrob(circleGrob(), gradient = rg))
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: mask ... registerGradientFill -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testpath.R’ failed.
Complete output:
>
> library(grid)
> require(gridSVG)
Loading required package: gridSVG
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> example(grid.path)
grd.pt> pathSample <- function(x, y, rule, gp = gpar()) {
grd.pt+ if (is.na(rule))
grd.pt+ grid.path(x, y, id = rep(1:2, each = 4), gp = gp)
grd.pt+ else
grd.pt+ grid.path(x, y, id = rep(1:2, each = 4), rule = rule, gp = gp)
grd.pt+ if (!is.na(rule))
grd.pt+ grid.text(paste("Rule:", rule), y = 0, just = "bottom")
grd.pt+ }
grd.pt> pathTriplet <- function(x, y, title) {
grd.pt+ pushViewport(viewport(height = 0.9, layout = grid.layout(1, 3),
grd.pt+ gp = gpar(cex = .7)))
grd.pt+ grid.rect(y = 1, height = unit(1, "char"), just = "top",
grd.pt+ gp = gpar(col = NA, fill = "grey"))
grd.pt+ grid.text(title, y = 1, just = "top")
grd.pt+ pushViewport(viewport(layout.pos.col = 1))
grd.pt+ pathSample(x, y, rule = "winding",
grd.pt+ gp = gpar(fill = "grey"))
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.col = 2))
grd.pt+ pathSample(x, y, rule = "evenodd",
grd.pt+ gp = gpar(fill = "grey"))
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.col = 3))
grd.pt+ pathSample(x, y, rule = NA)
grd.pt+ popViewport()
grd.pt+ popViewport()
grd.pt+ }
grd.pt> pathTest <- function() {
grd.pt+ grid.newpage()
grd.pt+ pushViewport(viewport(layout = grid.layout(5, 1)))
grd.pt+ pushViewport(viewport(layout.pos.row = 1))
grd.pt+ pathTriplet(c(.1, .1, .9, .9, .2, .2, .8, .8),
grd.pt+ c(.1, .9, .9, .1, .2, .8, .8, .2),
grd.pt+ "Nested rectangles, both clockwise")
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.row = 2))
grd.pt+ pathTriplet(c(.1, .1, .9, .9, .2, .8, .8, .2),
grd.pt+ c(.1, .9, .9, .1, .2, .2, .8, .8),
grd.pt+ "Nested rectangles, outer clockwise, inner anti-clockwise")
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.row = 3))
grd.pt+ pathTriplet(c(.1, .1, .4, .4, .6, .9, .9, .6),
grd.pt+ c(.1, .4, .4, .1, .6, .6, .9, .9),
grd.pt+ "Disjoint rectangles")
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.row = 4))
grd.pt+ pathTriplet(c(.1, .1, .6, .6, .4, .4, .9, .9),
grd.pt+ c(.1, .6, .6, .1, .4, .9, .9, .4),
grd.pt+ "Overlapping rectangles, both clockwise")
grd.pt+ popViewport()
grd.pt+ pushViewport(viewport(layout.pos.row = 5))
grd.pt+ pathTriplet(c(.1, .1, .6, .6, .4, .9, .9, .4),
grd.pt+ c(.1, .6, .6, .1, .4, .4, .9, .9),
grd.pt+ "Overlapping rectangles, one clockwise, other anti-clockwise")
grd.pt+ popViewport()
grd.pt+ popViewport()
grd.pt+ }
grd.pt> pathTest()
grd.pt> # Drawing multiple paths at once
grd.pt> holed_rect <- cbind(c(.15, .15, -.15, -.15, .1, .1, -.1, -.1),
grd.pt+ c(.15, -.15, -.15, .15, .1, -.1, -.1, .1))
grd.pt> holed_rects <- rbind(
grd.pt+ holed_rect + matrix(c(.7, .2), nrow = 8, ncol = 2, byrow = TRUE),
grd.pt+ holed_rect + matrix(c(.7, .8), nrow = 8, ncol = 2, byrow = TRUE),
grd.pt+ holed_rect + matrix(c(.2, .5), nrow = 8, ncol = 2, byrow = TRUE)
grd.pt+ )
grd.pt> grid.newpage()
grd.pt> grid.path(x = holed_rects[, 1], y = holed_rects[, 2],
grd.pt+ id = rep(1:6, each = 4), pathId = rep(1:3, each = 8),
grd.pt+ gp = gpar(fill = c('red', 'blue', 'green')),
grd.pt+ rule = 'evenodd')
grd.pt> # Not specifying pathId will treat all points as part of the same path, thus
grd.pt> # having same fill
grd.pt> grid.newpage()
grd.pt> grid.path(x = holed_rects[, 1], y = holed_rects[, 2],
grd.pt+ id = rep(1:6, each = 4),
grd.pt+ gp = gpar(fill = c('red', 'blue', 'green')),
grd.pt+ rule = 'evenodd')
>
> grid.export("path.svg")
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.export ... primToDev.pathgrob -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testpatternfill.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
> grid.newpage()
> # We are just going to be drawing a cross for our pattern
> crossGrob <- gTree(children = gList(
+ linesGrob(),
+ linesGrob(x = unit(0:1, "npc"), y = unit(1:0, "npc"),
+ gp = gpar(lwd = 1))
+ ))
>
> # Call the pattern "cross"
> # Using a small device size because the line widths
> # will be too small otherwise
> registerPatternFill("cross", grob = crossGrob,
+ dev.width = 1, dev.height = 1)
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: registerPatternFill -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testpendulum.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots7.pdf")
>
> grid.newpage()
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
>
> n <- 30
> L <- 50 #mm
> A <- 20 #mm
> t <- seq(0, 2*pi, length=n)
> x <- A*cos(t)
> v <- -A*sin(t)
> theta <- atan(x/L)
> y <- L*cos(theta)
>
> pushViewport(viewport(layout=grid.layout(4, 1,
+ widths=unit(2.2*A, "null"),
+ heights=unit(c(1, L + 10, 2.2*A, 2),
+ c("lines", "null", "null", "lines")),
+ respect=TRUE)))
> pushViewport(viewport(layout.pos.row=2,
+ xscale=A * c(-1.1, 1.1),
+ yscale=c(0, L + 10)))
> grid.rect()
> grid.lines(name="chain",
+ x=unit(c(0.5, x[1]), c("npc", "native")),
+ y=unit(1, "npc") - unit(c(0, abs(y)[1]), c("npc", "native")))
> grid.animate("chain",
+ x=animUnit(unit(c(rep(0.5, n), x),
+ c(rep(c("npc", "native"), each=n))),
+ timeid=rep(1:n, 2)),
+ y=animUnit(unit.c(unit(rep(1, n), "npc"),
+ unit(1, "npc") - unit(y, "native")),
+ timeid=rep(1:n, 2)),
+ duration=5, rep=TRUE)
> grid.circle(name="weight",
+ x=unit(x[1], "native"),
+ y=unit(1, "npc") - unit(y[1], "native"),
+ r=unit(1, "mm"),
+ gp=gpar(fill="black"))
> grid.animate("weight",
+ x=unit(x, "native"),
+ y=unit(1, "npc") - unit(abs(y), "native"),
+ duration=5, rep=TRUE)
> popViewport()
>
> pushViewport(viewport(layout.pos.row=3,
+ xscale=A * c(-1.1, 1.1),
+ yscale=A * c(-1.1, 1.1)))
> grid.rect()
> grid.lines(x=unit(c(0, 0), "native"),
+ gp=gpar(lty="dashed", col="grey"))
> grid.lines(y=unit(c(0, 0), "native"),
+ gp=gpar(lty="dashed", col="grey"))
> grid.text("Displacement", y=unit(-1, "lines"))
> grid.text("Velocity", x=unit(-1, "lines"), rot=90)
> grid.circle(name="key",
+ x=unit(x[1], "native"),
+ y=unit(v[1], "native"),
+ r=unit(1, "mm"),
+ gp=gpar(fill="black"))
> grid.animate("key",
+ x=unit(x, "native"),
+ y=unit(v, "native"),
+ duration=5, rep=TRUE)
> popViewport(2)
>
> popViewport()
>
> grid.export("pendulum.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testplot.R’ failed.
Complete output:
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots8.pdf")
> grid.rect(gp=gpar(col="black", fill=NA))
> set.seed(1000)
> grid.multipanel(vp=viewport(w=.7, h=.7, gp=gpar(col="black", fill=NA)),
+ newpage=FALSE)
> grid.export("plot.svg")
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.export ... primToDev.rect -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testplotmath.R’ failed.
Complete output:
> library(grid)
>
> ##################
> # Testing
> ##################
>
> # Test of a combination of shape and plotmath
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
> grid.newpage()
> grid.rect(x=.4, width=.4, height=.8, gp=gpar(fill="grey", col=NA))
> grid.text(expression((a + b)^2), x=.4, y=.6)
> grid.export("test2.svg")
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.export ... primToDev.rect -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testpolyline.R’ failed.
Complete output:
>
> library(grid)
> require(gridSVG)
Loading required package: gridSVG
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> grid.polyline(x=outer(c(0, .5, 1, .5), 5:1/5),
+ y=outer(c(.5, 1, .5, 0), 5:1/5),
+ id.lengths=rep(4, 5),
+ gp=gpar(col=1:5, lwd=3))
>
> grid.export("polyline.svg")
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
Calls: grid.export ... primToDev.polyline -> getID -> prefixName -> paste0 -> escapeSelector
Execution halted
Running the tests in ‘tests/testprefix.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pdf(file = NULL)
>
> pushViewport(viewport())
> grid.rect()
> grid.circle(name = "mycircle")
> grid.text("hello, world!")
> popViewport()
>
> # All IDs should now be exported with the prefix "TESTPREFIX"
> grid.export("test-prefixes.svg", prefix = "TESTPREFIX")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testrotate.R’ failed.
Complete output:
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> # Primitives to support:
> # rect
> grid.newpage()
> pushViewport(viewport(width=.5, height=.5, angle=30))
> grid.rect()
> popViewport()
> grid.export("rot-rect-default.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testtransparency.R’ failed.
Complete output:
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
> dev.new(width=6, height=6)
dev.new(): using pdf(file="Rplots9.pdf")
> # Some default settings
> pushViewport(viewport(gp=gpar(col="black", fill=NA)))
>
> # A plot with overlapping polygons where the overlap needs to be
> # coloured differently
>
> # Implemented using transparency
>
> # Some dummy data
> set.seed(1000)
> x <- sort(runif(20, 1, 10))
> y1 <- (x - 5) + rnorm(20)
> y2 <- -(x - 5) + rnorm(20)
>
> # Some "analysis"
> lm1 <- lm(y1 ~ x)
> lm2 <- lm(y2 ~ x)
>
> # Some calculated values to plot
> p1 <- predict(lm1, interval="confidence", type="response")
> p2 <- predict(lm2, interval="confidence", type="response")
>
> pushViewport(plotViewport(c(5, 5, 4, 2)))
> pushViewport(dataViewport(x, c(p1[,2], p2[,2], p1[,3], p2[,3])))
> grid.rect()
> grid.xaxis()
> grid.yaxis()
> grid.points(x, y1)
> grid.points(x, y2, pch=3)
> grid.lines(x, p1[,1], default.units="native")
> grid.lines(x, p1[,2], default.units="native")
> grid.lines(x, p1[,3], default.units="native")
> grid.lines(x, p2[,1], default.units="native")
> grid.lines(x, p2[,2], default.units="native")
> grid.lines(x, p2[,3], default.units="native")
> # overlapping polygons
> grid.polygon(c(x, rev(x)), c(p1[,2], rev(p1[,3])),
+ gp=gpar(fill="red", alpha=0.5),
+ default.units="native")
> grid.polygon(c(x, rev(x)), c(p2[,2], rev(p2[,3])),
+ gp=gpar(fill="green", alpha=0.5),
+ default.units="native")
>
>
> popViewport(2)
>
> popViewport()
>
> grid.export("transparency.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/testvp.R’ failed.
Complete output:
>
> # Test that 'vp' slots [viewports (vpTrees, vpLists, vpStacks) and vpPaths]
> # are being recorded correctly
>
> library(grid)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> grid.newpage()
> vp <- viewport(width=.5, height=.5, gp=gpar(fill="grey"))
> grid.rect(vp=vp)
> grid.export("grob-viewport.svg")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: grid.export ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Flavor: r-release-linux-x86_64
Version: 1.7-4
Check: re-building of vignette outputs
Result: WARN
Error(s) in re-building vignettes:
...
--- re-building ‘animation.Rnw’ using Sweave
Attaching package: ‘gridSVG’
The following objects are masked from ‘package:grid’:
linearGradient, pattern, radialGradient
The following object is masked from ‘package:grDevices’:
dev.off
Error: processing vignette 'animation.Rnw' failed with diagnostics:
chunk 2 (label = circle)
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
--- failed re-building ‘animation.Rnw’
--- re-building ‘extensibility.Rnw’ using Sweave
Attaching package: ‘gridSVG’
The following objects are masked from ‘package:grid’:
linearGradient, pattern, radialGradient
The following object is masked from ‘package:grDevices’:
dev.off
Warning: 'gridToSVG' is deprecated. Use 'grid.export' in future.'
Error: processing vignette 'extensibility.Rnw' failed with diagnostics:
chunk 11
Error in if (isUTF8) { : missing value where TRUE/FALSE needed
--- failed re-building ‘extensibility.Rnw’
--- re-building ‘gridSVG.Rnw’ using Sweave
Attaching package: ‘gridSVG’
The following objects are masked from ‘package:grid’:
linearGradient, pattern, radialGradient
The following object is masked from ‘package:grDevices’:
dev.off
Warning: 'gridToSVG' is deprecated. Use 'grid.export' in future.'
Error: processing vignette 'gridSVG.Rnw' failed with diagnostics:
chunk 2
Error in h(simpleError(msg, call)) :
error in evaluating the argument ‘group’ in selecting a method for function ‘devStartGroup’: missing value where TRUE/FALSE needed
--- failed re-building ‘gridSVG.Rnw’
SUMMARY: processing the following files failed:
‘animation.Rnw’ ‘extensibility.Rnw’ ‘gridSVG.Rnw’
Error: Vignette re-building failed.
Execution halted
Flavor: r-release-linux-x86_64
Current CRAN status: ERROR: 1, OK: 11
Version: 0.2-0
Check: tests
Result: ERROR
Running ‘test-clip.R’ [1s/2s]
Running ‘test-paths.R’ [1s/1s]
Running ‘test-raster.R’ [1s/1s]
Running ‘test-rect.R’ [1s/1s]
Running ‘test-symbol.R’ [1s/2s]
Running the tests in ‘tests/test-clip.R’ failed.
Complete output:
> library(grid)
> library(grImport2)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pic <- readPicture("test-clip-input.svg")
>
> gridsvg("test-noclip-output.svg", width = 6, height = 6, annotate=FALSE)
> grid.picture(pic, expansion = 0)
> dev.off()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: dev.off ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/test-paths.R’ failed.
Complete output:
> library(grid)
> library(grImport2)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pic <- readPicture("test-path-simple-input.svg")
>
> gridsvg("test-path-simple-output.svg", width = 6, height = 6, annotate = FALSE)
> grid.picture(pic, expansion = 0)
> dev.off()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: dev.off ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/test-raster.R’ failed.
Complete output:
> library(grid)
> library(grImport2)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pic <- readPicture("test-raster-input.svg")
>
> gridsvg("test-raster-output.svg", width = 6, height = 6, annotate = FALSE)
> grid.picture(pic, expansion = 0)
> dev.off()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: dev.off ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/test-rect.R’ failed.
Complete output:
> library(grid)
> library(grImport2)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pic <- readPicture("test-rect-input.svg")
>
> gridsvg("test-rect-output.svg", width = 6, height = 6, annotate = FALSE)
> grid.picture(pic, expansion = 0)
> dev.off()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: dev.off ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Running the tests in ‘tests/test-symbol.R’ failed.
Complete output:
> library(grid)
> library(grImport2)
> library(gridSVG)
Attaching package: 'gridSVG'
The following objects are masked from 'package:grid':
linearGradient, pattern, radialGradient
The following object is masked from 'package:grDevices':
dev.off
>
> pic <- readPicture("test-symbol-input.svg")
>
> gridsvg("test-symbol-output.svg", width = 6, height = 6, annotate = FALSE)
> grid.picture(pic, expansion = 0)
> dev.off()
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'group' in selecting a method for function 'devStartGroup': missing value where TRUE/FALSE needed
Calls: dev.off ... paste0 -> escapeSelector -> .handleSimpleError -> h
Execution halted
Flavor: r-release-linux-x86_64
Current CRAN status: OK: 12
Current CRAN status: OK: 12
Current CRAN status: OK: 12
Current CRAN status: NOTE: 2, OK: 10
Version: 3.0-2
Check: package dependencies
Result: NOTE
Packages suggested but not available for checking: 'showtext', 'sysfonts'
Flavors: r-release-macos-arm64, r-oldrel-macos-arm64
Current CRAN status: OK: 12
Current CRAN status: NOTE: 7, OK: 5
Version: 0.1
Check: installed package size
Result: NOTE
installed size is 5.5Mb
sub-directories of 1Mb or more:
R 2.7Mb
extdata 2.7Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64
Current CRAN status: OK: 12