Create a PhysioEvents object
References
Delorme A, Makeig S (2004). "EEGLAB: an open source toolbox for analysis of single-trial EEG dynamics." Journal of Neuroscience Methods, 134(1), 9-21.
Oostenveld R, Fries P, Maris E, Schoffelen JM (2011). "FieldTrip: Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data." Computational Intelligence and Neuroscience, 2011, 156869.
Examples
# Create events for a simple experiment
events <- PhysioEvents(
onset = c(1.0, 2.5, 4.0, 5.5),
duration = c(0.5, 0.5, 0.5, 0.5),
type = c("stimulus", "response", "stimulus", "response"),
value = c("target", "hit", "distractor", "false_alarm")
)
events
#> PhysioEvents with 4 events
#> Event types: stimulus, response
#> onset duration type value
#> 1 1.0 0.5 stimulus target
#> 2 2.5 0.5 response hit
#> 3 4.0 0.5 stimulus distractor
#> 4 5.5 0.5 response false_alarm
# Create events with single type
stim_events <- PhysioEvents(
onset = c(1, 2, 3, 4, 5),
type = "stimulus"
)