Which R am I using?
There are two sets of instructions - one for a temporary change of path and one for a permanent change. You are advised to do the temporary change to make sure R is doing what you want, then make the change permanent.
1. Check which shell you are using
Before either testing this version or using the new version permanently you need to know which shell you are using. The command
should produce one of /bin/bash/bin/(t)csh/bin/ksh .
Make sure you then follow the instructions that are for your particular shell - the change won't work otherwise.
2. Changing your path temporarily
These changes to your path will only last while your session is active. When you log out the changes will disappear. If you are using /bin/bash use the command
If you are using /bin/(t)csh set
If you are using /bin/ksh
Then type in
which should show
3. Changing your path permanently
The following instructions assume that you have a standard .profile file: this is found in your home directory. Mail email@example.com if you want to see a copy of the standard .profile file.
To change your path permanently edit your .profile file (carefully) and add a line
before the comment line
This is the command which you use to show output a screen at a time, if there is no PATH variable defined.
If there is already a PATH variable add /usr/local/bin to the beginning of the list of directories. For example, if
edit this to
You will need to log out and log back in again for this change to come into effect.
Again, check that you are running the correct version with