diff --git a/devcontainer.json b/devcontainer.json index 52db3f2..7b56482 100644 --- a/devcontainer.json +++ b/devcontainer.json @@ -11,7 +11,8 @@ "installDevTools": true, "installRadian": true, "installRMarkdown": true, - "installVscDebugger": true + "installVscDebugger": true, + "installJupyterlab": true }, "ghcr.io/h4rvey-g/rocker-devcontainer-features/apt-packages:1": { "packages": "r-cran-data.table,r-cran-tidyverse", diff --git a/postCreateCommand.sh b/postCreateCommand.sh index 9023152..232116d 100644 --- a/postCreateCommand.sh +++ b/postCreateCommand.sh @@ -9,9 +9,19 @@ sudo chmod 777 /usr/local/lib/R/site-library/_cache/ echo 'if (interactive() && Sys.getenv("RSTUDIO") == "") { source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "USERPROFILE" else "HOME"), ".vscode-R", "init.R")) }' >>~/.Rprofile -# add library(tidyverse) and library(qs) to .Rprofile -echo 'options(defaultPackages=c(getOption("defaultPackages"), "tidyverse", "targets", "qs"' >>~/.Rprofile # add github hosts curl https://gitlab.com/ineo6/hosts/-/raw/master/next-hosts | sudo tee -a /etc/hosts # use pak to install "rliger,Seurat,qs,targets" -Rscript -e 'pak::pkg_install(c("rliger","Seurat","qs","targets","crew"))' +Rscript -e 'pak::pkg_install(c("rliger","Seurat","qs","targets","crew", "skimr"))' +# add library(tidyverse) and library(qs) to .Rprofile +echo 'options(defaultPackages=c(getOption("defaultPackages"), "tidyverse", "targets", "skimr"))' >>~/.Rprofile +echo 'options(languageserver.formatting_style = function(options) { + style <- styler::tidyverse_style(indent_by = options$tabSize) + style$token$force_assignment_op <- NULL + style +})' >>~/.Rprofile +touch ~/.lintr +echo 'linters: linters_with_defaults( + line_length_linter(120), + commented_code_linter = NULL + )' >>~/.lintr \ No newline at end of file