After wasting a full day reinstalling r, studio, java and so on... I stumbled on this two webpages that totally fixed my problem.... they are easy to follow an will solve your problem in 5 mins
http://www.snaq.net/software/rjava-macos.php, for directing R to your java installation folder
you can skip all the detailed explanation ( very useful though) and go straight to the "Quick version" I configuration section.
After wasting a full day reinstalling r, studio, java and so on... I stumbled on this two webpages that totally fixed my problem.... they are easy to follow an will solve your problem in 5 mins