Learn R Programming

redlist (version 0.2.0)

rl_open_file: 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"))

Value

(Invisibly) returns the path to the file opened.

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

Examples

Run this code
if (FALSE) {
# Open user-level .Renviron
open_file()
}

Run the code above in your browser using DataLab