3
$\begingroup$

While asking a question about representing large time series in R I was discouraged from using R for digital signal processing. I understand that R is geared towards statistics. However, a signal is just a set of measurements. R also deals with time series, but they are usually at different time scales. Nevertheless, e.g. when predicting price evolution it is a matter of understanding the model behind it and possibly predicting it. That's quite close to what I usually want in physics.

In "traditional" digital signal processing (DSP), it is more common to analyze the signal in terms of its frequency components and their interplay or coherence (which is something like frequency dependent covariance of the amplitudes of frequency components) between signals.

I'm interested in R mostly because of some packages on CRAN with advanced scientific routines (which aren't as developed in Python) like signal for general DSP, wavelets and biwavelet for wavelet transforms and timsac for bispectrum. These packages should make this more "traditional" approach possible. However, I get the feeling that time series are generally analyzed in a different way in R as is apparent from the time series task view on CRAN. Are these more statistical models perhaps unsuitable for analyzing non-stationary time series?

So I ask whether there is something that makes R worse for DSP than e.g. Python+SciPy (which I currently use the most) or MATLAB. Is it perhaps some underlying implementation that makes operations slower? Or is it just that it would be necessary to change one's approach to analyzing signals to a more statistical one when using R? And would such an approach be perhaps limited in some way in comparison to the "traditional" DSP approach?

Note:

I tried asking this question on SO, but I was directed to rather ask here.

I'm interested in objective answers with sources, not just opinions. E.g.

  • which internal representations makes it slower
  • what are the limitations of the statistical models used for time series analysis, e.g. how they cope with non-stationary signals, n-wave interaction, etc.
$\endgroup$
4
$\begingroup$

Since the bulk of R’s DSP capability comes from the signal package which was ported over from the open source project Octave (itself influenced by MATLAB), there's no intrinsic limitation of R.

What you have picked up on, are ecosystem preferences. We learned MATLAB in university, picked up numpy/scipy/sklearn at work, so R isn't the first weapon of choice.

That said, there are some interesting "bridge" projects that you may be interested in exploring: https://stackoverflow.com/questions/5630441/how-do-rpy2-pyrserve-and-pyper-compare.

There is also the excellent interactive python (iPython) project, now called Jupyter, that recently introducing support for R notebooks: https://www.continuum.io/blog/developer/jupyter-and-conda-r. So tools & their inter-operability are converging!

$\endgroup$
-1
$\begingroup$

In case you are looking for opensource, R is a good choice. You can use the tuneR library in R for signal processing

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.