Skip to content
Prev 10284 / 12125 Next

[R-pkg-devel] Conversion failure in 'mbcsToSbcs'

Dear Ivan:

Thank you for your help again.

Thanks for your suggestion to use cairo_pdf() instead of pdf() to
allow for the multi-lingual plots.

I incorporated your advice and added the the code you suggested:

<<results=hide,echo=FALSE>>=
my.Swd <- function(name, width, height, ...)
 grDevices::cairo_pdf(
  filename = paste(name, "pdf", sep = "."),
  width = width, height = height
 )
@
\SweaveOpts{grdevice=my.Swd,pdf=FALSE}

as shown in lines 49-56 in my new vignette file here
(https://github.com/lindsayrutter/ggenealogy/blob/master/vignettes/ggenealogy.Rnw).

Upon attempting to build (R CMD build ggenealogy), I received the ERROR:

Error: processing vignette 'ggenealogy.Rnw' failed with diagnostics:
object 'my.Swd' not found
--- failed re-building ?ggenealogy.Rnw?

I tried replacing the code you suggested to various locations and
separating the \SweaveOpts line to be located at separate locations.
However, I received the same ERROR each time.

Do you have any suggestions or ideas on how to resolve this error?

I again thank you for your help with this issue.

Kind regards,
LAR
On Thu, Feb 15, 2024 at 3:17?PM Ivan Krylov <krylov.r00t at gmail.com> wrote: