Skip to content

Instantly share code, notes, and snippets.

@adomingues
Last active July 12, 2019 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adomingues/17110f273701d00e5d0e076f9cdc91f1 to your computer and use it in GitHub Desktop.
Save adomingues/17110f273701d00e5d0e076f9cdc91f1 to your computer and use it in GitHub Desktop.
## set default repository
options(repos = "http://cran.rstudio.com")
## install packages if missing
suppressMessages(if (!require("devtools")) utils::install.packages("devtools"))
suppressMessages(if (!require("rdoc")) devtools::install_github("mdequeljoe/rdoc"))
suppressMessages(if (!require("prettycode")) utils::install.packages("prettycode"))
## prettify the docs
rdoc::use_rdoc()
prettycode::prettycode()
grDevices::pdf.options(useDingbats = FALSE)
# ==========================================================================
# radian settings
# ==========================================================================
options(radian.auto_indentation = FALSE)
options(radian.color_scheme = "monokai")
# auto match brackets and quotes
options(radian.auto_match = TRUE)
# auto indentation for new line and curly braces
options(radian.auto_indentation = TRUE)
options(radian.tab_size = 4)
# timeout in seconds to cancel completion if it takes too long
# set it to 0 to disable it
options(radian.completion_timeout = 0.05)
# insert new line between prompts
options(radian.insert_new_line = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment