Announcement

Collapse
No announcement yet.

Would you consider switching your data reduction & statistics to R?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Would you consider switching your data reduction & statistics to R?

    All,
    I am interested in input from the Biomch-L community. Matlab, Labview and others tend to dominate the biomechanics programming landscape; however, this software can come at a steep price (especially when considering the additional annual fees!). If programs could be designed in R, a free matrix-based programming language, would you consider switching or at least adding R to your skill set?

    My background is primarily EMG & statistics. I am hoping to write a publicly available set of tools for surface EMG analysis at some point in the future. I am trying to decide if this should be undertaken in Matlab or R. Matlab presently has more higher-level signal processing resources, but the signal processing toolbox from Matlab has been ported into R as well. R has far more statistics and data mining capabilities than Matlab at this point.

    I am trying to decide whether the field will benefit more from a commonly used but expensive option (Matlab) or a less used but free option (R).

    Any input appreciated!

    Best Regards,

  • #2
    Re: Would you consider switching your data reduction & statistics to R?

    I will want to use it. I am exploring the use of signal decomposition methods to be used for my future studies (e.g. NMF, ICA, PARAFAC) and a well supported biomech package would be welcome for me. I am new to R and Matlab but if I can do everything on R, it is great for me.

    Comment


    • #3
      Re: Would you consider switching your data reduction & statistics to R?

      Absolutely. R is an excellent language for this use case. In fact, it is likely much better than Matlab/Labview for data reduction and statistics. R has a huge community of users and lots of great toolboxes.

      You may want to look in Python too. I use it for all of my biomechanical data munging. For example, here is a small package that does some basic gait data processing: https://github.com/csu-hmc/GaitAnalysisToolKit.

      Both the BiomechanicsToolKit and Opensim have Python wrappers too.

      Comment


      • #4
        Re: Would you consider switching your data reduction & statistics to R?

        I second Jason's suggestion of Python. I'm a long-time MATLAB user, but with all the expense (especially of toolboxes) I'm looking for an excuse to switch to Python. Octave mostly works as an alternative to MATLAB, but is not as clean/smooth, and has similar limitations.

        R is a good and popular platform, and so would be a fine choice.

        But I want to hitch to the Python wagon because of its general utility (easy ability to package executables for deployment, convert to C, etc.)

        Comment


        • #5
          Re: Would you consider switching your data reduction & statistics to R?

          I will also add my vote for Python and actually I would greatly recommend IPython and the IPython Notebook. It is an amazing toolset that is getting better all the time. The Notebook gives you a MathCAD-like interface in which you can run Python (and IPython) code. I have used it for numerous analyses that I had to document. It is wonderful to have the power of Python within a well-supported, notebook-like wrapper. Also, I recently found out that the IPython Notebook had been generalized to allow it to interface with different "back-ends" in addition to Python. In any case, Python is an object-oriented scripting/programming language with many, many 'modules' available for almost any conceivable analysis. The repository for modules is at https://pypi.python.org/pypi if you are interested in perusing what is available. Also, if you want to see some IPython Notebooks, you can look at http://nbviewer.ipython.org/. Notice that there is a signal processing example on the front page. My original programming training was in C and Fortran, which Matlab scripting is modeled after. It was easy for me to pick up Python. I really can't describe just how good and amazing Python and the associated tools are. Also, Python has been adopted by some schools as a first programming language (it is that easy to learn and read). But check out the links above. Also, as stated above, there are links between R and Python (in both directions). You can script R using Python and you can call R from within Python. IMHO, I would do the latter. Good luck.

          Comment


          • #6
            Re: Would you consider switching your data reduction & statistics to R?

            I'll add yet another vote for Python. Until about six years ago I used Matlab exclusively, but now I use Python 99% of the time. I find script-writing and general-purpose programming to be far more straightforward in Python, and it is also much easier to read other people's Python code than it is to read other people's Matlab code.
            By far the easiest way to get started in Python that I've seen is Enthought Canopy: https://www.enthought.com/products/canopy/ Canopy has a Matlab-like interface, comes pre-installed with the libraries that replicate Matlab-like function including IPython, and also has a very easy interface for installing new packages and keeping everything up-to-date. A $0 academic license is available, and various levels of paid support are also available.


            I concur that R is fantastic for data analysis and visualization, and it of course has superb statistics capabilities. However, I find Python to be much better for general-purpose programming including: third-party software integration, C source code integration and standalone GUI development.


            But I'd also suggest that you should choose the environment with which you feel most comfortable. It sounds like you prefer R, and if that's the case then I'd suggest you stick with that and create the best package you can. If the package is useful, people will gravitate to it regardless of what language it's written in, especially if you can provide some example scripts in other languages that replicate some of the core package's functionality.


            Best of luck!

            Comment


            • #7
              Re: Would you consider switching your data reduction & statistics to R?

              Thank you everyone for the suggestions! These were very helpful. As one of you noted, integrating R and Python can be pretty seamless; I am actually working on a similar set up for the analysis of my personal heart rate training data. I will work on building it in R, but plan for future Python integration. The hardest part of both R and Python is keeping up with the fantastic user bases which are constantly updating packages and improving capabilities.

              Cheers,
              Matt

              Comment

              Working...
              X