I have been having some weird issues with R (3.1.1) and RStudio (0.98.1079) and I suspect that it is due to the fact that these programs are not longer referencing the right
There are a host of questions about similar problems. All of them appear to come up when you update OS X to either Yosemite or Sierra with an older version of R already installed.
The easiest solution is to completely uninstall R (note the comments about using which R !), and then to install it again.
This also solves problems such as R showing different version numbers in terminal and the GUI.