install R with --enable-R-shlib=yes [for shared library]
if you have pre-installed R and want to install new version of R,
you need to install new version of R with shared library to share library with old version
and run rstudio.
https://stackoverflow.com/questions/28096239/how-to-configure-r-3-1-2-with-enable-r-shlib