To install package from CRAN-like repository:
repos <- c("https://mokymai.github.io/download/", getOption("repos"))
install.packages("snippets", repos = repos)
To install from GitHub:
# install.packages("remotes")
remotes::install_github("GegznaV/snippets")
# Replace current files with snippets with those in package "snippets"
# (backup copies are created by default)
snippets::install_snippets_from_package("snippets")
# Get the name of the directory where RStudio snippets are stored
get_path_rstudio_snippets_dir()
# Open the directory with RStudio snippets
open_rstudio_snippets_dir()
# Replace your R and Markdown snippets with those in package "snippets"
install_snippets_from_package("snippets", type = c("r", "markdown"), backup = TRUE)
list_snippet_file_backups()
# View and edit file with snippets of certain type: r
open_rstudio_snippets_file(type = "r")
# View and edit file with snippets of certain type: markdown
open_rstudio_snippets_file(type = "markdown")
# Create several back up files
backup_rstudio_snippets(type = "r")
Sys.sleep(1)
backup_rstudio_snippets(type = "r")
Sys.sleep(1)
backup_rstudio_snippets(type = "r")
list_snippet_file_backups(type = "r")
# Remove duplicated back-up files
remove_snippet_backup_duplicates()