hexSticker
hexSticker copied to clipboard
Problem with example
Hi, When I try to run the examples, I get this error message. What should I do ? Thanks in advance
s <- sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0), xlab="", ylab=""),
+ package="hexSticker", p_size=20, s_x=.8, s_y=.6, s_width=1.4, s_height=1.2,
+ filename="inst/figures/baseplot.png")
Error in UseMethod("validGrob") :
no applicable method for 'validGrob' applied to an object of class "NULL"
In addition: Warning messages:
1: Using ragg device as default. Ignoring `type` and `antialias` arguments
2: In editThisGrob(grob, specs) : slot 'vp' not found
3: In editThisGrob(grob, specs) : slot 'name' not found
Second on this.
When i run an example first time it is ok. Running it second time (no changes) show the error:
library(hexSticker)
#> Warning: package 'hexSticker' was built under R version 4.1.3
library(ggplot2)
outfile <- tempfile(fileext=".png")
s <- sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0), xlab="", ylab=""),
package="X", p_size=20, s_x=.8, s_y=.6, s_width=1.4, s_height=1.2,
filename=outfile)
#> Warning: Using ragg device as default. Ignoring `type` and `antialias` arguments
outfile <- tempfile(fileext=".png")
s <- sticker(~plot(cars, cex=.5, cex.axis=.5, mgp=c(0,.3,0), xlab="", ylab=""),
package="X", p_size=20, s_x=.8, s_y=.6, s_width=1.4, s_height=1.2,
filename=outfile)
#> Warning: Using ragg device as default. Ignoring `type` and `antialias` arguments
#> Warning in editThisGrob(grob, specs): slot 'vp' not found
#> Warning in editThisGrob(grob, specs): slot 'name' not found
#> Error in UseMethod("validGrob"): no applicable method for 'validGrob' applied to an object of class "NULL"
Created on 2022-06-15 by the reprex package (v2.0.1)
Problem is only with base graph. lattice/ggplot2 works.