openFile | R Documentation |
The function attempts to open a file either in RStudio or in a text editor, depending on the environment.
If the session is interactive, it tries to open the file in RStudio using rstudioapi::navigateToFile()
.
If RStudio is not available or the attempt fails, it opens the file in a text editor using utils::edit()
.
If the session is not interactive, it simply returns the contents of the file.
openFile(file, ...)
file |
character: name of the file |
... |
further parameters give to |
invisibly the result from try(rstudioapi::navigateToFile(file))
or try(utils::edit(file))
.
openFile(system.file("rstudio", "addins.dcf", package = "mmstat4"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.