Skip to content

Instantly share code, notes, and snippets.

@romainfrancois
Created April 3, 2019 14:56
Show Gist options
  • Save romainfrancois/ecd799ad8383f1546b37afb981cd0e84 to your computer and use it in GitHub Desktop.
Save romainfrancois/ecd799ad8383f1546b37afb981cd0e84 to your computer and use it in GitHub Desktop.
if(interactive()) {
.__Rprofile_env__. <- new.env(parent = emptyenv())
.__Rprofile_env__.[["install"]] <- pak::pkg_install
attach(.__Rprofile_env__.)
library(usethis, warn.conflicts = FALSE)
library(conflicted)
conflict_prefer("filter", "dplyr")
conflict_prefer("sql", "dbplyr")
library(usethis)
library(reprex)
library(prompt)
set_prompt(function(...){
paste0(
"[", git_branch(), git_dirty(), git_arrows(), "] ",
prompt_memuse()
)
})
options(
warnPartialMatchAttr = TRUE,
warnPartialMatchDollar = TRUE,
warnPartialMatchArgs = TRUE,
error = rlang::entrace,
keep.source = TRUE,
keep.source.pkgs = TRUE
)
utils::rc.settings(ipck = TRUE)
options("devtools.desc" = list(
Author = "Romain François",
License = "MIT + file LICENSE",
Version = "0.0.0.9000"
))
options("devtools.name" = "Romain François")
}
@gadepallivs
Copy link

gadepallivs commented Apr 4, 2019

Thank you for this. On windows, I get this error..how to overcome this ?

Error in .__Rprofile.env__.[["install"]] <- pak::pkg_install : 
  cannot do complex assignments in base namespace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment