[R] opening a PDF document

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Dec 15 10:37:12 CET 2008

Prof Brian Ripley wrote:
> On Sun, 14 Dec 2008, Dennis Fisher wrote:
>> Colleagues,
>> I am interesting in opening a PDF document via the command line from 
>> both Windows, OS X, and Linux ( R version 2.8.0).  I found a command 
>> openPDF in Biobase.  However, I would rather execute the command 
>> myself.  For example, in OS X:
>>>     system("open filename.pdf")
>> is successful.
>> Is there a comparable command line command for Windows or Linux?
> R for Windows has 'open.exe'.
> All other platforms have an apppriate comannd (if available) as 
> getOption("pdfviewer").

Actually, it looks like SUSE does not set it (nor does it set the 
browser, which has annoyed me more than once for RSiteSearch()). It's 
probably still the best option to assume that the user configures the 
option, rather than go look for acroread, xpdf, kpdf, evince,....

    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-help mailing list