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?
Thanks, Mike On Fri, Apr 1, 2016 at 8:09 AM, Dirk Eddelbuettel <e...@debian.org> wrote: > > On 31 March 2016 at 21:13, Michael Morrison wrote: > | 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. > > Sounds like a Windows issue. In essence, RInside calls R just like you > would > on the command-line (or through whatever GUI). If R is lacking font > information when running by itself, it will also lack them in RInside. > > The examples show plotting routines, including printing to bitmaps. That > all > works just fine on normal systems with all the font information (ie my > Linux > machines) and also on the Windows machines I tried. > > Dirk > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel