MATLAB® / R Reference, by David Hiebeler

Here is the current version of my MATLAB / R Reference in PDF form (last updated June 24, 2014). I wrote the initial version of this during Spring 2007, as I learned R while teaching my Modeling and Simulation course (I'd previously used only MATLAB for prior versions of the course). I have since continued to add to it. The reference is ideally suited for someone who is already good in one package and is trying to read code in or learn the other. It may also be useful as a reference (not a tutorial) for someone learning one of the packages, even with no experience in the other.

Note: I am still actively maintaining this document, though updates will likely come fairly slowly as I'm busy with many other things. I have a pretty good list of updates to merge in when I have time. Also, I have published a book inspired by this document:
R and MATLAB, Chapman and Hall / CRC, 2015, ISBN 9781466568389

The book goes into more detail on things only briefly mentioned in this PDF, such as reading/writing data from/to files, working with lists and cell arrays, the differences in writing functions between the two platforms, and so on. (Before publishing the book, I made it clear to the publisher that I would continue to maintain this freely available document; they are fine with that.)

Here are copies of the longer code snippets from the book (in tar and zip format), to avoid needing to type them in:

Change log

Here is a record of the various changes made to the document over time.