Of course, this doesn't mean I don't have to learn how to use R, it just means I get to do it all in Matlab (and note for fellow Matlab users, there is a great cheat sheet that shows how to translate between the two).
1. Install the R package rscproxy.
In R, enter:
to install the package.
2. Install the R(D)Com server.
Download it here. The server allows Matlab to talk with R. I installed it using the default settings without checking or unchecking any boxes. Note this server is built for Scilab, which is an open source version of Matlab, but it seems to work for Matlab too.
3. Download the Matlab R-Link toolbox
Get MATLAB_RLINK.zip here, unzip the contents, and paste MATLAB_RLINK in Matlab's toolbox folder (or whatever folder you want). Be sure to add MATLAB_RLINK to your Matlab path.
4. Restart your computer.
5. Is it working?
To see if the toolbox is working, start Matlab and enter 'Rdemo' at the command prompt. This should evoke:
1 4 9 16 25 36 49 64 81 100
2 5 10 17 26 37 50 65 82 101
6. Have fun!
If Rdemo worked, you are ready to go!
For instance, enter the following in Matlab:
openR; %Open connection to R server
x=[1:50]; %create x values in Matlab
putRdata('x',x); %put data into R workspace
evalR('y<-sqrt(x)'); %evaluate in R
evalR('plot(x,y)') %plot in R
To close the connection to R, and the graphs opened from R, enter:
If the above doesn't work, go to C:\Program Files\R, open the (D)COM Server folder, go to 'bin', copy 'sciproxy.dll', and paste it in C:\Program Files\MATLAB\R2009a\bin (obviously you may have a different path to Matlab's binary folder). Close Matlab, and restart your computer.
If that doesn't help, I probably won't be able to help, but go ahead and ask as someone might know. The site where you downloaded R-Matlab has some useful Q&A so you might inquire there.
This is basically an updated version of Kevin Murphy's site. Please let me know if anything here becomes obsolete.
9. Caveat (added 6/18/12)
From the comments section:
After using R(D)COM and Matlab R-link for a while, I do not recommend it. The COM interface has trouble parsing many commands and it is difficult to debug the code. I recommend using a system command from Matlab as described in the R Wiki. This also avoids having to install all of the RAndFriends programs.