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

Fix CRAN check errors #149

Closed
jrnold opened this issue Nov 20, 2023 · 2 comments
Closed

Fix CRAN check errors #149

jrnold opened this issue Nov 20, 2023 · 2 comments
Assignees

Comments

@jrnold
Copy link
Owner

jrnold commented Nov 20, 2023

Fix CRAN errors: https://cran.r-project.org/web/checks/check_results_ggthemes.html

Version: 4.2.4
Check: examples
Result: ERROR
Running examples in ‘ggthemes-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: circlefill_shape_pal
> ### Title: Filled Circle Shape palette (discrete)
> ### Aliases: circlefill_shape_pal
>
> ### ** Examples
>
> library("ggplot2")
>
> p <- ggplot(mtcars, aes(x = mpg, y = hp, shape = factor(cyl))) +
+ geom_point()
>
> p + scale_shape_tremmel()
> p + scale_shape_circlefill()
Error in grid.Call.graphics(C_points, x$x, x$y, x$pch, x$size) :
 conversion failure on '●' in 'mbcsToSbcs': for ● (U+25CF)
Calls: <Anonymous> ... drawDetails -> drawDetails.points -> grid.Call.graphics
Execution halted
@jrnold jrnold self-assigned this Nov 20, 2023
@jrnold
Copy link
Owner Author

jrnold commented Nov 20, 2023

That is

FlexDotPlot RFishBC RTSA RcmdrPlugin.RiskDemo WhatsR auditor geofacet
ggsurvfit ggthemes ggwordcloud gridpattern ivregEX mapmisc
phonTools poker qlcMatrix rchess reporter ruta scales

These do not work in the pdf() device used for R-devel CMD check on CRAN
(and for most others) and so give a check failure with R-devel CMD check
--as-cran or if environment variable R_CHECK_MBCS_CONVERSION_FAILURE
is set to a non-empty value. Note that this stops at the first issue.

NB: the issues will not be seen on a platform whose libiconv does
transliteration -- known are macOS 14 and Alpine Linux. But for example
on macOS 14, missing symbols are silently substituted by ?, which is not
useful.

[The cairo_pdf() and cairo_ps() devices handle fonts differently and can
plot a wider (but platform-dependent) range of Unicode chars. You could
arrange for your examples/tests to use cairo_pdf() if dev.cur() shows
the current device is pdf() and cairo_pdf() finds the glyphs.

None of the graphics devices to which I have access were able to plot
the emojis used by WhatsR.

For superscripts (reporter) another possibility is to use plotmath.

Please correct before 2023-11-14 to safely retain your package on CRAN.
Do study the plots produced: CRAN submissions does not have resources
to do so.

@jrnold
Copy link
Owner Author

jrnold commented Feb 8, 2024

Fixed by #150

@jrnold jrnold closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant