R/config-startup.R

Defines functions editrenv editrprof

Documented in editrenv editrprof

#' R Startup Functions
#'
#' Use these utility functions to quickly edit your \code{.Rprofile},
#' \code{.Renviron}, or other startup files.
#'
#' @name startup
#'
#' @param scope scope - user or project
#'
#' @return invisible
#'
#' @seealso See [base::Startup()] for details on the R specific startup process.
#'
#' @export

# edit_startup <- function(which = "choose") {
#
#   files <- c(
#     "R Profile" = Sys.getenv("R_PROFILE_USER"),
#     "R Environment" = Sys.getenv("R_ENVIRON_USER"),
#     "R Makevars" = ,
#     "RStudio Snippets",
#     "Git Ignore",
#     "Git Config",
#     "R Secrets File",
#     "R History"
#   )
#
#   paths <- list(
#     Sys.getenv("R_PROFILE")
#   )
#
#   utils::select.list(
#     choices = files,
#
#   )
#
# }

#' @rdname startup
#' @importFrom utils file.edit
editrprof <- function(scope = c("user", "project")) {
  file.edit("~/.config/R/.Rprofile")
}

#' @rdname startup
#' @importFrom utils file.edit
editrenv <- function(scope = c("user", "project")) {
  file.edit("~/.config/R/.Renviron")
}

# editrbuildignore <- function()
jimbrig2011/jimstools documentation built on Sept. 14, 2022, 1:38 a.m.