orig <- Sys.getenv("ADMB_HOME")
## this doesn't make sense but won't break anything
## until you actually try to run AD Model Builder
setup_admb("elsewhere")
Sys.setenv(ADMB_HOME="") ## erase environment variable
## Not run:
# setup_admb() ## auto-locate (fails if ADMB not found)
# ## End(Not run)
Sys.setenv(ADMB_HOME=orig) ## restore sanity
Run the code above in your browser using DataLab