Skip to content
Snippets Groups Projects
Commit 38fa9d5b authored by Tom Rushby's avatar Tom Rushby
Browse files

Initial commit.

parent 18a57610
No related branches found
No related tags found
1 merge request!6Update to include Rushmoor local authority area in Hampshire (previously missing)
env.R 0 → 100644
# parameters widely re-used across this repo
repoParams <- list() # params holder as a list
listFiles <- FALSE
# Location ----
# attempt to guess the platform & user
repoParams$info <- Sys.info()
repoParams$sysname <- repoParams$info[[1]]
repoParams$nodename <- repoParams$info[[4]]
repoParams$login <- repoParams$info[[6]]
repoParams$user <- repoParams$info[[7]]
# Base Data path ----
dLoc <- "unknown - find this line in env.R and fix it!"
if (repoParams$sysname == "Darwin") {
# we're on a Mac (local) so we can set the data path to the Resource drive (if mounted)
dLoc <- "/Volumes/Resource/CivilEnvResearch/Public/SERG/data/"
}
if (repoParams$sysname == "Windows") {
# we're on Windows (local) so we can set the data path to J: drive (if mounted)
dLoc <- "J:/CivilEnvResearch/Public/SERG/data/"
}
if (repoParams$nodename == "srv02405") {
# we're on the UoS RStudio server so we set the data path to:
dLoc <- path.expand("/mnt/SERG_data/")
}
if (grepl("prd-cls2k4", repoParams$nodename)) {
# we're on the UoS SVE so we can set the output path to J: (as mounted)
dLoc <- "J:/CivilEnvResearch/Public/SERG/data/"
}
# Data (SSEN) ----
dPath <- paste0(dLoc, "geography/")
### Output ----
outPath <- paste0(dLoc,"geography/export/")
# Feedback ----
message("You're ", repoParams$user, " using " , repoParams$sysname, " on ", repoParams$nodename)
message("Default dPath has been set to: \n", dPath)
if (listFiles) { # optional
message("and these are the files/folders in that dPath:")
print(try(list.files(dPath))) # in case it breaks
}
message("Check env.R if that's not what you expected...")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment