Skip to contents

Wrapper around rstudioapi::documentOpen(), but with fs paths, for consistency. If the file could not be opened, a clickable hyperlink is displayed.

Usage

open_rs_doc(path, line = -1L, col = -1L, move_cursor = TRUE)

active_rs_doc()

Arguments

path

The path to the document.

line

The line in the document to navigate to.

col

The column in the document to navigate to.

move_cursor

Boolean; move the cursor to the requested location after opening the document?

Value

Invisibly returns the document id

Details

Examples

if (FALSE) {
  # open the fictious file.R at line 5
  open_rs_doc("file.R", line = 5)
}