Get value from environmental variable or R option or default in that order if the previous one is missing.
Useful links