p.measures calculates simple peak amplitude and latency for each condition
in the data frame. Values are calculated for grand average waveforms, as well as
for each individual subject. Values are based on the electrode, or electrode cluster for
dense arrays, provided in electrodes. This function will identify the largest
deviation from 0, whether positive or negative.
p.measures(data, electrodes, window, num.pts = 10)load.dataload.data) do not have a header, you
must include a capital "V" in front of the number and enclose each electrode in quotes.
(For example, electrodes = "V78", or electrodes = c("V78", "V76").)epoch.st and epoch.end defined in
load.data (you only need to define the epoch once upon importing the data).num.pts
to 0.p.measures simply returns the largest absolute value deviation from zero.
# Calculate peak latency and amplitude
p.measures(ERPdata, electrodes = "V78", window = c(1000, 1500))
Run the code above in your browser using DataLab