ggg ggg - 2 months ago 4
HTML Question

Make PDF help files open automatically

In R, if we set the

argument of
function to
and call it, it will automatically open the html help in a browser. However, this is not the case for
help_type = 'pdf'
. Only the pdf is generated. How can I make it automatically after the help file is generated? I believe that pdf help are preferred by some as it can display mathematical formula properly, the html help dont.


Based on aL3xa comment, under Windows you could use shell.exec to view pdf.

help("plot", help_type="pdf") # help file is saved in working directory
shell.exec(file.path(getwd(), "plot.pdf"))