Description Usage Arguments Value Note Author(s) References Examples
Creates plot of multi-channel electroencephalography (EEG) spatial map. User can control the plot type (2d or 3d), the colormap, color, etc.
1 2 3 4 5 6 | eegspace(space, voltage, vlim = NULL, mycolors = NULL, ncolor = 25,
colorbar = TRUE, nctick = 5, rtick = 1, cex.axis = 1,
barloc = NULL, colorlab = NULL, colorlabline = 3, cex.lab = 1,
plotaxes = FALSE, main = "", xyzlab = NULL, cex.point = 1,
cex.main = 1, nose = TRUE, ears = TRUE, head = TRUE,
col.head = "AntiqueWhite", mar = NULL, ...)
|
space |
Matrix of input electrode coordinates (3d or 2d). |
voltage |
Vector of recorded EEG voltage at each row in |
vlim |
Two-element vector giving the limits to use when mapping |
mycolors |
Character vector of colors to use for color mapping (such that |
ncolor |
Number of colors to use in mapping (positive integer). |
colorbar |
If |
nctick |
Approximate number of ticks for colorbar. Ignored if |
rtick |
Round tick labels to given decimal. Ignored if |
cex.axis |
Cex of axis ticks for colorbar. Ignored if |
barloc |
Character vector giving location of color bar. See Notes. |
colorlab |
Character vector giving label for color bar. Ignored if |
colorlabline |
Line number for color bar label (for input to |
cex.lab |
Cex of axis labels for colorbar. Ignored if |
plotaxes |
If |
main |
Plot title. Default is no title. |
xyzlab |
Axis labels to use for plot. If |
cex.point |
Cex for plotted electrodes. |
cex.main |
Cex for plot title. Ignored if |
nose |
If |
ears |
If |
head |
If |
col.head |
Color for dummy head in 3d plot. Ignored if |
mar |
Margins to use for plot (see |
... |
Optional inputs for |
Produces plot of EEG spatial map with NULL
return value.
For 3d plots, barloc
can be one of four options: "backright"
, "backleft"
, "frontright"
, or "frontleft"
. For 2d plots, barloc
can be either "right"
or "left"
.
Currently supports spatial maps registered to the 84-channel cap produced by eegcap
and eegcoord
.
Nathaniel E. Helwig <helwig@umn.edu>
Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science.
Begleiter, H. Neurodynamics Laboratory. State University of New York Health Center at Brooklyn. http://www.downstate.edu/hbnl/
Ingber, L. (1997). Statistical mechanics of neocortical interactions: Canonical momenta indicatros of electroencephalography. Physical Review E, 55, 4578-4593.
Ingber, L. (1998). Statistical mechanics of neocortical interactions: Training and testing canonical momenta indicators of EEG. Mathematical Computer Modelling, 27, 33-64.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ########## EXAMPLE ##########
# get time point 65 (approx 250 ms) from "eegdata" data
data(eegdata)
idx <- which(eegdata$time==65L)
eegdata <- eegdata[idx,]
# get average spatial map
eegmean <- tapply(eegdata$voltage,list(eegdata$channel,eegdata$group),mean)
# remove ears and nose
acnames <- rownames(eegmean)
idx <- c(which(acnames=="X"),which(acnames=="Y"),which(acnames=="nd"),which(acnames=="Cz"))
eegmean <- eegmean[-idx,]
# match to eeg coordinates
data(eegcoord)
cidx <- match(rownames(eegmean),rownames(eegcoord))
# # plot average control voltage in 3d
# open3d()
# eegspace(eegcoord[cidx,1:3],eegmean[,2])
# plot average control voltage in 2d
eegspace(eegcoord[cidx,4:5],eegmean[,2])
# # change 3d bar location and use play3d to rotate (not run)
# open3d()
# par3d(windowRect=c(0,0,600,600))
# eegspace(eegcoord[cidx,1:3],eegmean[,2],barloc="frontleft")
# play3d(spin3d(axis=c(0,0,1),rpm=5),duration=20)
# change 2d bar location
eegspace(eegcoord[cidx,4:5],eegmean[,2],barloc="left")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.