[Rcpp-devel] Calling ggsave or pdf from RInside
mwmorrison93 at gmail.com
Fri Apr 1 16:29:43 CEST 2016
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?
On Fri, Apr 1, 2016 at 8:09 AM, Dirk Eddelbuettel <edd at 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,
> | 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
> | base directory used to search for the font isn't C:\R\R-3.2.4\.... as it
> | 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
> | 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
> 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
> works just fine on normal systems with all the font information (ie my
> machines) and also on the Windows machines I tried.
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel