[Rcpp-devel] Calling ggsave or pdf from RInside

Michael Morrison mwmorrison93 at gmail.com
Fri Apr 1 06:13:48 CEST 2016


Hello, i'm new to RInside and Rcpp. I trying to run a small test to output
a a pdf using a series of calls to the RInside library. Whenever I call
ggsave (or pdf) via these calls i get the following error message:

*Error in pdf(file = "C:/path/to/file/file.pdf", height = 3.5,  :*
*  failed to initialise default PDF font*
*In addition: Warning messages:*
*1: In pdf(file = "**C:/path/to/file/file.pdf**", height = 3.5,  :*
*  afm file '?,x`/library/grDevices/afm/Helvetica.afm' could not be opened*
*2: In pdf(file = "**C:/path/to/file/file.pdf**", height = 3.5,  :*
*  cannot load afm file 'Helvetica.afm'*
*terminate called after throwing an instance of 'std::runtime_error'*
*  what():  Error evaluating: pdf(file="**C:/path/to/file/file.pdf**,
height=3.5, width=5, encoding="C:/R/R-3.2.4/library/grDevices/enc/WinAnsi")*


I have R 3.2.4 installed on a Windows Server 2008 R2 box. as you can see
the base directory used to search for the font isn't C:\R\R-3.2.4\.... as
it should be but instead a strange base directory "?,x" is being used. Is
there some way that I can set the base directory to the proper location. I
apologize if I haven't provide enough information to help troubleshoot, if
not just please let me know what I need to send and I will do so promptly.

Thanks in advance for your help.

Thanks,
Michael Morrison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160331/2da43c64/attachment.html>


More information about the Rcpp-devel mailing list