I know I can use setwd and all that within the scripts but that breaks the portability of the script - especially when the files I am interested in are on Network drives with different paths on OSX, Windows, etc.
Is there a way that if I call 'Rscript myScript.R' from '~/path/to/my/script' that this will be also be the working directory for the purposes of the script?