12
$\begingroup$

I'm starting some EEG studies on attention, and would really like to use R for preprocessing (filtering/artifact rejection), visualization, and analysis, but I can find very little in the way of tools. If there isn't a standalone package, what packages might be useful?

Things I want to do:

  • Condition categorization according to events, and comparing all subsequent analyses by condition
  • Power spectral density in specific frequency bands (SMR, theta, beta, alpha, etc.)
  • Event-related potentials
  • LORETA (low-resolution electromagnetic tomography)
$\endgroup$
3
  • $\begingroup$ Checkout the package listing:<br> <a href="cran.rstudio.com/">http://cran.rstudio.com/</a>. It might help people to help you, if you clarify what you are trying to accomplish with R and EEG data. $\endgroup$
    – Cbaker510
    Commented Sep 3, 2014 at 20:31
  • $\begingroup$ Why do you want to use R? $\endgroup$
    – jona
    Commented Sep 3, 2014 at 22:09
  • 3
    $\begingroup$ Because the documentation & community is better for R than Matlab, and because I don't have to worry about budget for licenses on R. $\endgroup$
    – Krysta
    Commented Sep 4, 2014 at 12:53

3 Answers 3

13
$\begingroup$

Antoine Tremblay has just released an advanced analysis toolbox: http://onlinelibrary.wiley.com/doi/10.1111/psyp.12299/abstract

It's missing about half the features on your list, although fundamentally, spectral density is a simple task and LORETA is a stand-alone package anyways (although similar approaches, e.g. general CSD estimation, are implemented in many packages). Basically, once you got the EEG data read into R and cleaned of artifacts, ERPs (simple averaging) and spectra are fairly basic tasks and LORETA is an external toolbox agnostic of where it's getting its data from.

Alternatively, I would propose to use either one of the two standard MATLAB-based solutions (EEGLAB or Fieldtrip), or MNE in one of its iterations (e.g. the one in Python). All of these will handle the tasks you're talking about.

$\endgroup$
2
  • $\begingroup$ Thanks! Any suggestions on visualization? Creating graph arrays for 24 channels of ERP or EEG can be very tedious, and I bet somebody's done it before. $\endgroup$
    – Krysta
    Commented Sep 4, 2014 at 12:52
  • 3
    $\begingroup$ Butterfly plots, as in fig. 2 in the paper; or means over ROIs and facet wrap ggplot over hemisphere and front/back. $\endgroup$
    – jona
    Commented Sep 4, 2014 at 14:41
3
$\begingroup$

For the sake of completeness:

  1. eegkit, see https://cran.r-project.org/web/packages/eegkit/index.html

  2. For "historical purposes" perhaps the following could also be of interest, although development seems somewhat stagnant lately: https://rdrr.io/cran/eegAnalysis/

$\endgroup$
3
$\begingroup$

I was searching for alternative when I fell on this post. Here are a few others

eegUtils , the same author has a blog that might be of interest to you for further reading here

I also found eegAnalysis but the last update was in 2014

Finally for ERPs there is erpR

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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