Note: This project is currently on the backburner due to other pursuits. I am not actively working on it, but may return in the future. Feel free to fork and make any improvements as you see fit.
This is the source code for spmR, an R implementation of Statistical Parametric Mapping, a mode of analysis used in neuroimaging.
Recently, the present maintainer (John Pellman) has obtained the source code from the original author (Yves Rosseel) but has not modified it in any way has modified it only lightly. By placing the code on GitHub, the present maintainer hopes to make it readily accessible for future development. Most of his present work involves either documenting it or dreaming up ways to make it work better with R.
The most often used implementation of SPM is written and maintained by the Wellcome Trust at UCL. The Wellcome Trust's implementation is built upon MATLAB, is reasonably stable, and should be used by most sane people. The present maintainer's vision for spmR is that it should be used as both an enjoyable diversion and a starting base should neuroscientists ever choose to migrate to the R platform/ecosystem for doing their analyses.
To wit, there are several advantages that an implementation of SPM built upon R might provide:
- Easier access to novel statistical methods which are unlikely to be implemented in MATLAB/Octave (having a user base consisting primarily of statisticians tends to create this advantage).
- R is free (both as in freedom and in beer).
- R readily interfaces with HPC software, such as OpenMPI/MPICH/LAM-MPI. It also is really friendly with Hadoop.
Slides from a presentation by the original author describing spmR: http://www.wias-berlin.de/workshops/neuroimaging2011/slides/rosseel.pdf
The official website of the creators of SPM: http://www.fil.ion.ucl.ac.uk/spm/
- Rewrite documentation in comments at the heads of functions to documentation that can be roxygenized.
- First pass- basic addition of tags
- Second pass - re-order tags sensibly, make style consistent
- Third pass - make documentation consistent with the idiosyncrasies of R rather than MATLAB
- Coordinate with other R packages (namely fmri in CRAN).
- Add support for preprocessing.
- Any of the various other TODOs that I come across in the code- these should be added to
this listGithub's issue tracker as they are discovered. - Determine which spm functions really should be ported.
- Rewrite documentation for unported spm functions as roxygen comments.
- Go over code and look for potential bugs.
- Maybe implement a method of saving SPM.mat files out so that they can be used with SPM8 (and also loading in SPM.mat files generated by SPM).
- Create a list of CRAN libraries that this could use.
- Consider refactoring some of the more confusing variable names.
- Make the SPM object from MATLAB into a true OOP object and not some crazy blend of structural and cell arrays.
- Convert this list into issues within the issue tracker.
- spm_filter.R has a convenient notice that the other files lack
- Port SPM wholly/partially to Julia and transform this into a set of bindings to Julia functions.