Skip to content

Instantly share code, notes, and snippets.

@micstr
Created March 20, 2015 08:16
Show Gist options
  • Save micstr/c50cd3f7c2ec6cc4bd08 to your computer and use it in GitHub Desktop.
Save micstr/c50cd3f7c2ec6cc4bd08 to your computer and use it in GitHub Desktop.
identify machine name to adapt server connections or directories
# Identify what machine you are running on in R
# Use [[ to get the name out of entry
# Help from http://r.789695.n4.nabble.com/computer-name-td3593120.html
k.machine.name <- Sys.info()[["nodename"]]
k.dir.proj = "C:/Users/Michael/GitHub/FVCA" #ALIEN
if (identical(k.machine.name, "FVCA-BLOOMBERG")) {
k.dir.proj <- "C:/Users/Info/Documents/GitHub/FVCA" #FVCA-BLOOMBERG OVERRIDE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment