Used to remove the mean of a specified time period from the data. Currently only performs subtractive baseline. With a data frame, searches for "electrode" and "epoch" columns, and groups on these when found. An electrode column is always required; an epoch column is not.
rm_baseline(data, time_lim = NULL, ...) # S3 method for eeg_data rm_baseline(data, time_lim = NULL, verbose = TRUE, ...) # S3 method for eeg_epochs rm_baseline(data, time_lim = NULL, verbose = TRUE, ...) # S3 method for data.frame rm_baseline(data, time_lim = NULL, verbose = TRUE, ...) # S3 method for eeg_tfr rm_baseline(data, time_lim = NULL, type = "divide", verbose = TRUE, ...) # S3 method for eeg_evoked rm_baseline(data, time_lim = NULL, verbose = TRUE, ...)
data | Data to be baseline corrected. |
---|---|
time_lim | Numeric character vector (e.g. time_lim <- c(-.1, 0)). If none given, defaults to mean of the whole of each epoch if the data is epoched, or the channel mean if the data is continuous. |
... | other parameters to be passed to functions |
verbose | Defaults to TRUE. Output descriptive messages to console. |
type | Type of baseline correction to apply. Options are ("divide", "ratio", "absolute", "db", and "pc") |
eeg_data
: remove baseline from continuous eeg_data
eeg_epochs
: Remove baseline from eeg_epochs
data.frame
: Legacy method for data.frames
eeg_tfr
: Method for eeg_tfr
objects
eeg_evoked
: Method for eeg_evoked
objects
rm_baseline(demo_epochs)#>#> Epoched EEG data #> #> Number of channels : 11 #> Number of epochs : 80 #> Epoch limits : -0.197 - 0.451 seconds #> Electrode names : A5 A13 A21 A29 A31 B5 B6 B8 B16 B18 B26 #> Sampling rate : 128 Hz #> Reference : average#> Epoched EEG data #> #> Number of channels : 11 #> Number of epochs : 80 #> Epoch limits : -0.197 - 0.451 seconds #> Electrode names : A5 A13 A21 A29 A31 B5 B6 B8 B16 B18 B26 #> Sampling rate : 128 Hz #> Reference : average