Open a file in RStudio, optionally at a specified location.
Path to the file to open)
Optional; integer specifying the line number on which to place the cursor
Optional; integer specifying the column number on which to place the cursor
navigateToFile opens a file in RStudio. If the file is already open, its tab or window is activated.
Once the file is open, the cursor is moved to the specified location. If the
column arguments are both equal to
-1L (the default), then
the cursor position in the document that is opened will be preserved.
Note that if your intent is to navigate to a particular function within a file, you can also cause RStudio to navigate there by invoking
View on the function, which has the advantage of falling back on deparsing if the file is not available.
navigateToFile function was added in version 0.99.719 of RStudio.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.