locate ms on a ERP plot

Description

This functions is meant to be used with a plot obtained with erp function. It reads the position of the graphics cursor when the (first) mouse button is pressed and returns the x-coordinates in ms.

Usage

1
ms.locator(type = "p", startmsec, endmsec, lengthsegment, label=TRUE, n=512, ...)

Arguments

type

the type of plot. this parameter is passed to locator

startmsec

the time (in ms) of the start of the segment.

endmsec

the time (in ms) of the end of the segment.

lengthsegment

the length (in points) of the segment.

label

logical. If TRUE the located ms are plotted on the figure.

...

further parameters to be passed to locator function.

n

The maximum number of points to locate.

Value

The time in ms associated with each located point is printed on the R prompt.

Author(s)

Giorgio Arcara

See Also

locator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
	
data(ERPsets)

word=grandaverage("Exp1_word_subj", 1:20, erplist=ERPsets) 

erp(word$F3, smo=0, col="blue", startmsec=-200, endmsec=1500, ylim=c(-6,6))


ms.locator(type="p", startmsec=-200, endmsec=1500, lengthsegment)


## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.