Part answer no 2 in view of further information:
Generally, I've been working in RStudio, but I'd still like to access R from the terminal and also to find where things are located.
I plan to incorporate this answer in my first answer once there is resolution. Learning myself, and hope for helpful comments to guide here.
I find a fresh download and install of R, also installs R.app. Earlier versions of R did not do so.
Where are the R files stored?
In Terminal after starting R, or in R.app, one can type:
>R.home()
to learn where the R files being accessed are located.
In my case:
In R.app - the R accessed is in the top directory: /Library/Frameworks/R.framework/Resources - and is version 3.4.0
In Terminal - the R accessed is in the Anaconda package in the top directory /anaconda/lib/R - and is version 3.3.2
To ensure I use the latest version of R when invoking in Terminal, could update the anaconda version, however, I would prefer not to as as other elements of the anaconda package my depend on this older version.
So the solution is to have R in Terminal find the newer version and run that. I figured I could make this happen by changing PATH in the env file so first search for
This leads to the question you raise, does one change PATH in the env file in Bash, to ensure the version of R you would like to run is found.
A good explanation of PATH can be found at: http://www.linfo.org/path_env_var.html
I have since edited by PATH to look first in the same folder location for R
R.app, and R invoked in Terminal access two different installations of R on my set up.
One can determine where the R files are by starting R in each, and typing the command while in R