Skip to content

Instantly share code, notes, and snippets.

@etiennebr
Last active August 20, 2023 10:54
Show Gist options
  • Save etiennebr/ed87a6214b86f0424caf0bed8e243ba8 to your computer and use it in GitHub Desktop.
Save etiennebr/ed87a6214b86f0424caf0bed8e243ba8 to your computer and use it in GitHub Desktop.
# install.packages(c("tidyverse",
# "devtools",
# "testthat",
# "usethis",
# "reprex",
# "covr",
# "lintr",
# "styler",
# "fs",
# "lookup",
# "sloop"
# ))
if (interactive()) {
options(
# limit number of lines printed
max.print = 100,
# dev tools -----------------------------------------------------------
# warn on partial matches
warnPartialMatchDollar = TRUE,
warnPartialMatchArgs = TRUE,
warnPartialMatchAttr = TRUE,
# usethis config
usethis.description = list(
`Authors@R` = 'person("Etienne", "Racine", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-1109-894X"))',
License = "MIT + file LICENSE"
),
usethis.full_name = "Etienne Racine",
# nice tracebacks
error = rlang::entrace,
rlang__backtrace_on_error = "branch" # or "none", "reminder", "branch" or "full", see https://rlang.r-lib.org/reference/rlang_backtrace_on_error.html
)
suppressMessages(require(devtools))
suppressMessages(require(testthat))
suppressMessages(require(usethis))
suppressMessages(require(reprex))
suppressMessages(require(covr))
suppressMessages(require(lintr))
suppressMessages(require(fs))
suppressMessages(require(styler))
suppressMessages(require(sloop))
suppressPackageStartupMessages(require(lookup))
# custom functions
..unixts <- function(x) as.POSIXlt(x, origin = "1970-01-01")
# avoid saving sessions
utils::assignInNamespace(
"q",
function(save = "no", status = 0, runLast = TRUE)
{
.Internal(quit(save, status, runLast))
},
"base"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment