In R, if we set the help_type argument of help() function to 'html' 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.
+1
A:
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"))
Marek
2010-05-31 22:05:33
I have modified your code to create a function to automate the opening of the pdf help file. I wonder why R does not do that by default.
ggg
2010-06-01 14:25:53
Help system in R is changing all the time, I don't be surprised if that option will be available in one of next versions.
Marek
2010-06-01 15:26:27