rprofile_update: A function to update my .Rprofile from a version on Github

Description Usage Arguments Details Examples

View source: R/rprofile_update.R

Description

A function to update my .Rprofile from a version on Github

Usage

1
2
3
4
5
rprofile_update(
  open.only = TRUE,
  local.rprofile.path = "~/.Rprofile",
  url = "https://raw.githubusercontent.com/mleary/dotfiles/main/.Rprofile"
)

Arguments

open.only

logical value. Defaults to opening the local .Rprofile via the usethis::edit_r_profile. If False, will update the .Rprofile.

local.rprofile.path

character value. Path to local .Rprofile. Defaults to common "~/.Rprofile".

url

character value. URL to RAW github text file with Rprofile template. Defaults to my .Rprofile template on github

Details

This function helps with editing one's .Rprofile. It will open the current .Rprofile by default. If open.only set to FALSE, it updates the .Rprofile and then opens the .Rprofile. It defaults to taking a template .Rprofile from my github and updates the current working sessions .Rprofile. Note that it checks for the file at the common "~/.Rprofile" location, but can be manually adjusted for projects, etc.

Examples

1
2
3
library(learylib)

rprofile_update()  # using default settings

mleary/learylib documentation built on Sept. 6, 2020, 9:19 p.m.