This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.First <- function(){ | |
# adapted from: https://lapsedgeographer.london/2020-11/custom-r-prompt/ | |
my_prompt <- function(...) { | |
git_branch <- suppressWarnings(system("git rev-parse --abbrev-ref HEAD", | |
ignore.stderr = TRUE, intern = TRUE)) | |
if (length(git_branch) != 0) { | |
git_msg <- paste0(" @", git_branch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' initialize_project | |
#' | |
#' @param database_user defaulted to `NULL`. if you use a database in your | |
#' project, this parameter takes your username as its value | |
#' prompts for creation if not | |
#' @param use_renv should the project use renv? | |
#' @param use_vscode do you use vscode for your project? | |
#' @param include_readme creates a README.md file | |
#' @param include_sql creates a directory for sql files | |
#' @param include_data creates a directory for data in, out, and temporary |