Neuroeconomics
  • News
  • Research
    • Overview
    • Current Projects
    • Publications
    • Presentations
    • Resources >
      • MUSE >
        • MUSE Setup
        • MUSE Data Collection
        • MUSE Analysis
        • MUSE HELP
        • MUSE RESULTS
      • Lab Information >
        • Electrode Configuration
        • Data Analysis
        • PLOTTING DATA
  • People
    • Team
    • Present and Past
    • Information for Current Students
    • Information for Prospective Students >
      • Honours
      • GRADUATE STUDENTS >
        • MSc in Neuroscience

Plotting EEG Results with R

The methods here involve using R and the ggplot2 library to create manuscript quality figures. You will need to install both R and R Studio to use the following code. A guide on how to do this is HERE.

You will also have to install the ggplot2 library. To do so, on the command line in R type:
install.packages("ggplot2")

R commands will be in bold. Make sure you set your working directory (SESSION) in R Studio to where your data is stored.

Plotting Two Conditional Waveforms with a Difference Waveform

We will use the sample data HERE for this tutorial. Note that the sample data consists of three columns, the first containing time points, the second and third containing grand average ERP waveform data.

library("ggplot2")                        
Tells R that you are going to use ggplot2. Ignore the warning.

plot.data = read.table("sample_waves.txt") 
Loads the plot data into a table (a data structure).

  
Copyright © 2015
  • News
  • Research
    • Overview
    • Current Projects
    • Publications
    • Presentations
    • Resources >
      • MUSE >
        • MUSE Setup
        • MUSE Data Collection
        • MUSE Analysis
        • MUSE HELP
        • MUSE RESULTS
      • Lab Information >
        • Electrode Configuration
        • Data Analysis
        • PLOTTING DATA
  • People
    • Team
    • Present and Past
    • Information for Current Students
    • Information for Prospective Students >
      • Honours
      • GRADUATE STUDENTS >
        • MSc in Neuroscience
✕