<div dir="ltr"><div class="gmail_extra">Thanks for your reply, much appreciated. The call works just fine if I make it from the R GUI or R studio. I tested out the calls there first before trying to make the same calls from RInside. Do you know if there's a way that the base directory can be set through some other call?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Mike</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 1, 2016 at 8:09 AM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On 31 March 2016 at 21:13, Michael Morrison wrote:<br>
| Hello, i'm new to RInside and Rcpp. I trying to run a small test to output a a<br>
| pdf using a series of calls to the RInside library. Whenever I call ggsave (or<br>
| pdf) via these calls i get the following error message:<br>
|<br>
| Error in pdf(file = "C:/path/to/file/file.pdf", height = 3.5,  :<br>
|   failed to initialise default PDF font<br>
| In addition: Warning messages:<br>
| 1: In pdf(file = "C:/path/to/file/file.pdf", height = 3.5,  :<br>
|   afm file '?,x`/library/grDevices/afm/Helvetica.afm' could not be opened<br>
| 2: In pdf(file = "C:/path/to/file/file.pdf", height = 3.5,  :<br>
|   cannot load afm file 'Helvetica.afm'<br>
| terminate called after throwing an instance of 'std::runtime_error'<br>
|   what():  Error evaluating: pdf(file="C:/path/to/file/file.pdf, height=3.5,<br>
| width=5, encoding="C:/R/R-3.2.4/library/grDevices/enc/WinAnsi")<br>
|<br>
|<br>
| I have R 3.2.4 installed on a Windows Server 2008 R2 box. as you can see the<br>
| base directory used to search for the font isn't C:\R\R-3.2.4\.... as it should<br>
| be but instead a strange base directory "?,x" is being used. Is there some way<br>
| that I can set the base directory to the proper location. I apologize if I<br>
| haven't provide enough information to help troubleshoot, if not just please let<br>
| me know what I need to send and I will do so promptly.<br>
<br>
Sounds like a Windows issue. In essence, RInside calls R just like you would<br>
on the command-line (or through whatever GUI).  If R is lacking font<br>
information when running by itself, it will also lack them in RInside.<br>
<br>
The examples show plotting routines, including printing to bitmaps. That all<br>
works just fine on normal systems with all the font information (ie my Linux<br>
machines) and also on the Windows machines I tried.<br>
<span><font color="#888888"><br>
Dirk<br>
<br>
--<br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
</font></span></blockquote></div><br></div></div>