This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dotR <- file.path(Sys.getenv("HOME"), ".R") | |
| if (!file.exists(dotR)) dir.create(dotR) | |
| M <- file.path(dotR, "Makevars.win") | |
| if (!file.exists(M)) file.create(M) | |
| cat("\n CXX14FLAGS += -mtune=native -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2", | |
| file = M, sep = "\n", append = FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # update Ubuntu packages as root | |
| sudo apt-get update && sudo apt-get --with-new-pkgs upgrade -y | |
| # Ensure /usr/lib/R/site-library is writeable | |
| sudo chmod 777 -R /usr/lib/R/site-library | |
| # Update R packages as root | |
| sudo R -q -e "update.packages(ask = FALSE)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copy packages from previous minor version of R to new version of R library directory | |
| # from https://community.rstudio.com/t/reinstalling-packages-on-new-version-of-r/7670/3 | |
| lib_loc <- "C:\\Users\\tom\\Documents\\R\\win-library\\4.0" | |
| to_install <- unname(installed.packages(lib.loc = lib_loc)[, "Package"]) | |
| to_install | |
| install.packages(pkgs = to_install) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt-get update -y && | |
| apt-get --with-new-pkgs upgrade -y && | |
| apt-get install -y gfortran \ | |
| libgmp-dev \ | |
| r-cran-ggplot2 \ | |
| r-cran-gridextra \ | |
| r-cran-cowplot \ | |
| r-cran-plyr \ | |
| r-cran-reshape2 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssc install xbrcspline | |
| ssc install metan | |
| ssc install metareg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # macOS developer tools without installing XCode | |
| xcode-select --install | |
| # homebrew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| brew install checkbashisms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run check as CRAN (well sort of) | |
| devtools::check(env_vars = c(NOT_CRAN = FALSE)) | |
| devtools::check(env_vars = c(NOT_CRAN = FALSE), cran = TRUE, force_suggests = TRUE, incoming = TRUE) | |
| # Additionally not building/re-running the vignettes | |
| devtools::check( | |
| env_vars = c(NOT_CRAN = FALSE), | |
| args = c( | |
| '--no-manual', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| rm -r ~/.local/share/rstudio/sessions/active |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CC="C:\Program Files\LLVM\bin\clang.exe" | |
| # CXX="C:\Program Files\LLVM\bin\clang++.exe" | |
| # CXX11="C:\Program Files\LLVM\bin\clang++.exe" | |
| # CXX14="C:\Program Files\LLVM\bin\clang++.exe" | |
| # CXXFLAGS=-O1 -g -fsanitize=address -fno-omit-frame-pointer | |
| # PKG_CXXFLAGS=-Og -fsanitize=address | |
| # LDFLAGS=-fsanitize=address | |
| ## CXX14FLAGS += -mtune=native -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 | |
| CXX14FLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ensure hyper v installed | |
| # DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V | |
| # https://www.hanselman.com/blog/shrink-your-wsl2-virtual-disks-and-docker-images-and-reclaim-disk-space | |
| cd $env:LOCALAPPDATA\Docker\wsl\data | |
| optimize-vhd -Path .\ext4.vhdx -Mode full | |
| # optional | |
| # start docker | |
| Start-Process -FilePath "C:\Program Files\Docker\Docker\Docker Desktop.exe" |