Krigolson Lab
  • News
  • Research
    • Overview
    • Current Projects >
      • DESTINATION MARS
      • Fatigue Research
      • MEDICAL DECISION MAKING
      • SPORT PERFORMANCE
    • Publications
    • Presentations
    • Resources >
      • Git Hub
      • Lab FAQ
      • Lab Information >
        • Electrode Configuration
        • Data Analysis
        • PLOTTING DATA
        • Source Code
      • MUSE >
        • MUSE 2016 >
          • INSTALLATION
          • Tutorial Videos
          • MUSE Analysis
        • MUSE 2014 >
          • MUSE Setup
          • MUSE Data Collection
          • MUSE Analysis
          • MUSE RESULTS
          • MUSE HELP
      • ON THE WEB
      • Reading List
  • People
    • Team
    • Present and Past
    • Information for Current Students >
      • Masters Students >
        • MSc Timeline
        • Thesis Proposal
        • Thesis Document
        • Thesis Defence
      • Reference Letters
    • Information for Prospective Students >
      • GRADUATE STUDENTS >
        • MSc in Neuroscience
      • Honours

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 >
      • DESTINATION MARS
      • Fatigue Research
      • MEDICAL DECISION MAKING
      • SPORT PERFORMANCE
    • Publications
    • Presentations
    • Resources >
      • Git Hub
      • Lab FAQ
      • Lab Information >
        • Electrode Configuration
        • Data Analysis
        • PLOTTING DATA
        • Source Code
      • MUSE >
        • MUSE 2016 >
          • INSTALLATION
          • Tutorial Videos
          • MUSE Analysis
        • MUSE 2014 >
          • MUSE Setup
          • MUSE Data Collection
          • MUSE Analysis
          • MUSE RESULTS
          • MUSE HELP
      • ON THE WEB
      • Reading List
  • People
    • Team
    • Present and Past
    • Information for Current Students >
      • Masters Students >
        • MSc Timeline
        • Thesis Proposal
        • Thesis Document
        • Thesis Defence
      • Reference Letters
    • Information for Prospective Students >
      • GRADUATE STUDENTS >
        • MSc in Neuroscience
      • Honours