Simple R Markdown document

This is an R Markdown document.

FALSE
on_rstudio <- function() {
  if (commandArgs()[[1L]] == "RStudio") {
    return(TRUE)
  }
  FALSE
}

I choose to only print 40 lines.

options(max.print = 40)
if (interactive() & requireNamespace("shrtcts", quietly = TRUE)) {
  shrtcts::add_rstudio_shortcuts(set_keyboard_shortcuts = TRUE)
}
options(usethis.destdir = "/Users/jameslaird-smith/Google Drive/Applications/RStudio")

if (requireNamespace("prompt", quietly = TRUE)) {
  # my_prompt <- function(...) paste0("[", prompt :: git_branch(),"]", " > ")
  my_prompt <- function(...) paste0(prompt::prompt_runtime())
  prompt::set_prompt(my_prompt)
  rm(my_prompt)
}


Try the customiser package in your browser

Any scripts or data that you put into this service are public.

customiser documentation built on Sept. 11, 2024, 9:33 p.m.