Skip to content

Instantly share code, notes, and snippets.

@gisma
Created October 10, 2021 16:28
Show Gist options
  • Save gisma/bed5f4431b6d39098a35472359bb9969 to your computer and use it in GitHub Desktop.
Save gisma/bed5f4431b6d39098a35472359bb9969 to your computer and use it in GitHub Desktop.
### mpg course basic setup
# install/check from github
devtools::install_github("envima/envimaR")
packagesToLoad = c("mapview", "raster", "sf")
# Source setup script
require(envimaR)
rootDir = envimaR::alternativeEnvi(root_folder = "~/edu/geoAI",
alt_env_id = "COMPUTERNAME",
alt_env_value = "PCRZP",
alt_env_root_folder = "F:/BEN/edu")
"run/", # folder for runtime data storage
# Now set automatically root direcory, folder structure and load libraries
envrmt = envimaR::createEnvi(root_folder = rootDir,
folders = projectDirList,
path_prefix = "path_",
libs = packagesToLoad,
alt_env_id = "COMPUTERNAME",
alt_env_value = "PCRZP",
alt_env_root_folder = "F:/BEN/edu")
## set raster temp path
raster::rasterOptions(tmpdir = envrmt$path_tmp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment