Unicode conversion error when using the `pdf()` device
Closed this issue · 0 comments
nanxstats commented
R 4.4.0 adds more stringent checks when using the pdf()
device which doesn't support plotting Unicode characters very well. This happens when R CMD check
is running the code examples to produces a pdf file of the plots: problematic for hGraph()
as it uses wchar = "\u03b1"
.
Usually, this can be fixed by using plotmath or using dev.cur()
with Cairo PDF devices. In our case, since wchar
is directly passed down to ggplot2 calls, using Cairo PDF is probably a more feasible solution.
Now we see under r-devel (will become R 4.4.0):
checking examples ... [3s/4s] ERROR
Running examples in ‘gMCPLite-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hGraph
> ### Title: Create multiplicity graphs using ggplot2
> ### Aliases: hGraph
>
> ### ** Examples
>
> # Defaults: note clockwise ordering
> hGraph(5)
Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
conversion failure on 'α=0.005' in 'mbcsToSbcs': for α
Calls: <Anonymous> ... drawDetails -> drawDetails.text -> grid.Call.graphics
Execution halted