rl_open_file: Open file for editing

View source: R/utils.R

rl_open_fileR Documentation

Open file for editing

Description

Opens a specified file for editing in the system's default editor (as configured by R).

Usage

rl_open_file(path = NULL, scope = c("user", "project"))

Arguments

path

Optional character string specifying the path to the file to open. If NULL (default), a .Renviron file is opened based on the value of scope.

scope

Character string indicating which .Renviron file to open when path = NULL:

  • user: Opens the user-level .Renviron

  • project: Opens or creates a .Renviron file in the current working directory

Value

(Invisibly) returns the path to the file opened.

Examples

## Not run: 
# Open user-level .Renviron
open_file()

## End(Not run)


redlist documentation built on Aug. 21, 2025, 5:39 p.m.