File Exchange

image thumbnail

Dataframe (ala R/Splus) for MATLAB

version (43.5 KB) by Brian McGill
Implements dataframes and model objects similar to R/Splus using MatLab classes - makes statistics m

1 Download

Updated 30 May 2006

No License

I use MATLAB for most of my day-in-day-out work. I teach statistics using R. For the most part, I am happy using MATLAB (if only because its what I know best), but two features of R that I really miss in MATLAB are:

1) Dataframes - a neat wrapper for statistical data (variables in columns, cases in rows)

2) The idea of a model object - run a regression or whatever and then get back an object to manipualate it

So I have implemented (partially) these two features in MATLAB. The documentation is sparse and features are currently biased in my own research directions. I would welcome comments and code contributions (which would be fully acknowledged).

Comments and Ratings (4)


Danxia (view profile)

Hello, is there a compatible version for Matlab 2017? There are many error messages

This is comforting. Thank you! Now all we need is reshape and ggplot2

Hovav Dror

I miss the exact same features. What you offer is SO truely needed.
But, the implementation is not there, yet. Maybe its incompatibility to Matlab 7, but there are too many error messages

Robert Van Hoose

The dataframe class is very useful, and does a good job replacing the functionality that I had grown so accustomed to using in R. The only thing that's missing in my estimation is R's "merge" command to join two dataframes. I will write one in the near future, and post it here.
Thanks for this submission, it's been a great help to me.


Fixed a couple of errors that showed up in version 7. Lint stilll highlights more issues than I would like but haven't had time to do full upgrade.

Bug in documentation - do not put @dataframe and @model on the Matlab path!

MATLAB Release Compatibility
Created with R13SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor