Changelog
Source:NEWS.md
eegUtils 0.8.0
Function changes
-
plot_timecourse()now requires facets and mappings to be explicitly stated during the call, rather than added afterwards. This allows it to use weighted averages when required. -
plot_timecourse.eeg_tfr()now defaults to no baseline correction, and takes atypeargument for baseline type to be specified. - Added new
plot_gfp()function for calculating and plotting Global Field Power. -
topoplot()now supports plotting of multiple timepoints - pass a list of times to thetime_limargument. -
topoplot()now supports custom fill titles through thefill_titleargument, and automatically switches where necessary (e.g. now says “Power mV^2”). Fill titles are now also centred. -
browse_data.eeg_ICA()now provides the option to select components for rejection, and returns a character vector of selected components. - Recoded
browse_data()to usebslibfor styling. -
view_ica()now allows you to select components for rejection, to double-click on topographies to inspect them individually, and to return cleaned data. -
eeg_average()now supports averaging over conditions ineeg_evokedfiles -
eeg_average()now records weights - the number of epochs that went into an average - and uses those in subsequent steps where possible foreeg_epochs/eeg_evoked/eeg_tfrobjects. -
compute_tfr()now has an argumenttrim_edgeswhich allows users to switch off automatic removal of epoch edges after transformation. Defaults to TRUE. -
rm_baseline()now adds a record of the baseline period - Changed logic of
eeg_combine.eeg_epochs(). Now checks for duplicate epochs directly usingepoch,participant_idandrecording, and only corrects when there are duplicates. This meansrecordingandparticipant_idhave to be matching acrosseeg_epochsobjects for the timing correction to be applied.
Internal changes/bug fixes
- Recoded
faster_epochs()to no longer usedata.table. - added
parse_cycles()function for use duringcompute_tfr() - Using
electrode_locations()on adata.framewould return a data frame with the electrode names in full upper case. Now returns with the electrodes in their original case. -
eeg_evokedobjects should now contain reference information. -
ar_for_icafile started, moving some functions fromartefact_rejection.R -
select_timesprevented from converting single column data.frames to vectors after subsetting. -
plot_timecourse.eeg_tfrnow correctly uses thefreq_rangeparameter. - Improvements to internal processing logic in
view_ica()to improve performance. -
import_raw(..., fast_bdf = TRUE)will now discard Annotations rather than fail to import BDF files with Annotations. - removed dependency on
Matrix- now usingqr()$rankinrun_ICArather than usingMatrix::rankMatrix()to determine rank of input signals. - Added numerous
dropped_aesvariables to the customggplot2stat_functions for compatibility withggplot2 3.4.0. - Replaced
sizeaesthetic withlinewidthfor compatibility withggplot2 3.4.0. - Lots of minor code style improvements
- Deprecated function
iir_filtremoved - Refactored
run_ICAand adopted faster SOBI methods - Used internal legendre polynomial function and removed
pracmadependency - Used internal whitening methods in
sobi_ICAand removedwhiteneningdependency
eegUtils 0.7.0
Function changes
- Add
imaxmethod torun_ICA(). This allows use of theinfomaxICA algorithm from theinfomaxpackage, which is a reimplementation of the extended-Infomax algorithm used in theEEGLABMatlab toolbox. -
erp_scalp()andinteractive_scalp()should now appropriately use channel locations included in the data. - More informative messages when using
compute_tfr(). -
plot_tfr()now applies baseline correction on a single-trial basis where possible, which may show different results when using non-linear baseline correction (e.g.divideordB) -
topoplot()now allows you to provide multiple component numbers when plotting from aneeg_ICAobject, and will automatically produce an appropriately facetted plot. -
topoplot()now has akparameter to control the smoothing when usingmethod = "gam". - added additional
demo_spatialdata from a spatial cueing experiment. -
plot_difference()function added for plotting ERP difference waves. Only currently handles two levels. - Added
hanningtaper support forcompute_tfr. Note that the scaling factors used for allcompute_tfrcalculations have been adjusted, so the exact numerical values returned will change. However, this is just a scaling factor - the relative distances between values remained unchanged. -
ar_FASTER()has experimental support foreeg_groupobjects when those objects areeeg_evokedgroups. It does not perform rejection but reports how many times each participants data breaks a threshold for a number of measures. -
import_raw()defaultparticipant_idis now changed toNAinstead ofcharacter(1), to promote better use witheeg_combine(). -
eeg_combine()will now refuse to combine objects whereparticipant_idis missing (i.e. isNA), and warn when combining objects with the previous default value ““. This is to prevent accidentally treating data from different participants as being from the same participant. -
topoplot()now provides informative messages about the head radius used for plotting. The default calculation ofrwhen usinginterp_limit = "head"has changed and should now be set at the outermost electrode’s position + a 10% buffer. Smallerrcan be set manually. - added
get_participant_id,set_participant_id,get_recordingandset_recordingto interact with theepochsmetadata in eacheegUtilsobject. -
eeg_combine()handleseeg_tfr()objects better, now returns an error when trying to combine single-trial data. -
plot_timecourse()now handleseeg_tfr()objects.
Internal changes / bug fixes
-
erp_scalp()andinteractive_scalp()now use cleaner evaluation of thecolourargument usingrlang - Fixed adding CSD as new reference when using
compute_csd() - When using a scaling number of cycles in
compute_tfr(), they will now also use thespacingparameter to determinelogorlinearscaling. - Fixed bug with
eeg_average()used onc("eeg_group", "eeg_tfr")objects. - Fixed bug with incorrect number of epochs calculated when epoching
eeg_dataobjects if there were multiple “target” triggers appearing in an epoch. - Fixed error with
erp_raster()whenanat_order == FALSE - new
epoch_queriesfile for functions for setting and getting theepochsstructure - new
check_itemsfile for functions that check for consistency of various structures -
eeg_combine()witheeg_tfr()no longer drops single dimensions, which was causing issues when there was only one channel or epoch in the object. -
plot_timecourse.eeg_tfrnow correctly passes baseline period torm_baseline() -
filter.eeg_tfr()was sometimes dropping single dimensions when usingabind::asub(), now fixed
eegUtils 0.6.3
Function changes
- Added log spaced frequencies to
compute_tfr(), with the newspacingargument.plot_tfrautomatically detects the spacing and plots the figure appropriately. - Added
na.rmoption toerp_image()to either keep or plot trials with NA values due to smoothing. By default they’ll be removed. - Added more informative messages for
compute_psd().
Internal changes / bug fixes
- Some minor documentation fixes.
-
plot_tfr()error when selecting a specific frequency range fixed. - Switched to new style of
vdiffrtests - fixed
erp_image()smoothing over time instead of epochs.
eegUtils 0.6.2
Function changes
- added support for
EEGLAB.set files saved in newer Matlab file formats. - changed first argument of
eeg_filter()todatainstead of.data - added some more informative user messages for importing data and adding electrode locations.
-
erp_image()now supportseeg_tfrobjects.
Internal changes / bug fixes
- When combining three or more continuous
eeg_dataobjects,eeg_combine()would substantially undercorrect the timing of events in the third file - this is now fixed. -
groupsparameter fortopoplot()now correctly passed for all types of object. -
stat_tests.Rfile removed, will be reimplemented elsewhere - Long standing issues with import of channel locations from EEGLAB files hopefully fixed…
-
rm_baseline()foreeg_evokedno longer usesdata.table -
as.data.frame.eeg_evoked()handles grouped data better. -
import_set()now handles all EEGLAB formats better.
eegUtils 0.6.1
Function changes
-
ar_eogcornow has abipolarizeargument which can be set to false when the HEOG/VEOG channels are already bipolarized. - added some new
ggplot2based functions for topoplotting and adding contours -
geom_topo()now has contours - added errors with when attempting to use
compute_psdorcompute_tfroneeg_groupobjects. -
compute_tfr()now works better witheeg_evokedobjects that contain multiple conditions.
Internal changes / bug fixes
-
eeg_referencenow handles multiple reference channels better on rereferencing -
get_scalpmaphandleseeg_ICAcomponents better when there are channels with no locations - Travis-CI removed.
-
cart_to_sphericalcoord flipping bug fixed (hopefully…) -
filternow converts to tibble internally and does not coercesignalsto a vector when there is only one channel. - added copyright info to
summary_contourfile -
eeg_combine.eeg_evokedmade to behave more consistently when creating grouped data - all
as.data.frame()functions moved todf_converters.r
eegUtils 0.6.0
IMPORTANT: There have been some changes to the logic of the topoplot() that may make their appearance quite different. Specifically, these changes are to the way the underlying interpolation grid is calculated and to how things like the diameter of the cartoon head is calculated. These changes often lead to different minimum or maximum amplitudes across the image, and thus changes in the appearance of the plot due to different scales- don’t be alarmed!
Function changes
-
epoch_databaseline correction now defaults to no baseline correction - Added
filtermethod foreeg_tfrobjects -
fit_glm()overhauled. Now far faster and allows specification of models using standard R formulae. - New
eeg_lmclass introduced for output offit_glm(). -
plot_butterfly.eeg_lm()method added -
as.data.frame()methods have been added foreeg_lmobjects. -
view_ica()Shiny viewer foreeg_ICAandeeg_decompobjects added. -
view_artefacts()Shiny viewer for channel and epoch stats added. -
plot_timecourse()now takes a mapping argument, which allows use ofggplot2aes()mappings -
eeg_average.eeg_tfr()now follows behaviour of othereeg_average()methods in respecting theepochsstructure. -
compute_itc()added for computing inter-trial coherence fromeeg_tfrobjects. -
colsadded toeeg_average.eeg_tfr -
eeg_combine.tfr_average()added to handle pre-averagedeeg_tfrobjects -
compute_tfr()now allows non-constant number of cycles -
compute_tfr()now uses a different scaling factor, so raw units should now be microvolts-squared. - added
import_erplab()function -
plot_timecourse()now allows CIs foreeg_groupobjects.
Internal changes / bug fixes
-
plot_tfr()now always drops NA/NaN values and averages appropriately over electrodes and conditions. -
import_set()handles continuous EEG data from EEGLAB much better - Now using
whiteningpackage for whitening before SOBI ICA -
select_epochsforeeg_ICAobjects fixed to correctly remove epochs fromsignals - added tests for
filter.eeg_ICAandfilter.eeg_tfr - fixed
filter.eeg_dataandfilter.eeg_evoked -
select_elecsforeeg_ICAnow correctly removes components from the unmixing matrix - switched back to using
left_joinfromdplyrin thetag_eventsfunction as an easy fix for sorting of events when tagging. - fixed odd interaction between
select()andvalidate_channels()that reordered channel names inchan_info -
eeg_decompnow doing better job of filtering forssdmethod - various
tibblerelated warnings and errors cleaned up. -
method = "gam"should now yield sensible results forgeom_topo() -
run_ICA()andeeg_decomp()methods now return components ordered by percent variance explained (high to low) - removed scaling of components in SOBI ICA method
-
browse_data().eeg_icagrid res reduced -
eeg_reference().eeg_epochswas always average referencing, now fixed. - cleaner code in
topoplot()for biharmonic smooth -
compute_psd()now demeans individual segments when doing Welch FFT; also no longer errors when only one segment per channel -
eeg_tfr()internal structure modified to keep 4 dimensions even after averaging, for consistency -
stat_summary_by_fill()added to do averaging for raster plots effectively. -
convert_tfr()now properly returns converted data -
import_raw()fix for Brain Vision Analyzer files with date fields in the markers - added
versionfield to most objects
eegUtils 0.5.0
Function changes
- Default settings for Infomax ICA changed to be similar to EEGLAB/Fieldtrip.
- Faster reading of bdf implemented. Old behaviour can be retained using
fast_bdf = FALSEparameter toimport_raw() -
eeg_combinenow supports combining lists. -
eeg_referencenow supportseeg_epochsandeeg_evokedobjects. ### Internal changes / bug fixes -
plot_butterflyshould now be faster again. - Much faster reader for BDF implemented.
-
eeg_filteraddeddemeanparameter so that removing channel/epoch means during filtering is now optional. Defaults to TRUE. - Added artefact detection options for ICA objects
-
ar_acf()checks for low autocorrelation -
ar_chanfoc()checks for excessive channel focality (e.g. components that load mostly on one channel) -
ar_trialfoc()checks for trial focality (components that load mostly on a few trials) -
ar_eogcor()checks for correlation with EOG channels
-
-
topoplotplotting radius logic altered -
compute_csdnow useseeg_referencerather thanreref_eeg - Unmixing matrix for SSD decompositions fixed.
-
compute_tfrreworked to be faster. - Faster baseline correction implemented using Rcpp.
- Padding now used during
compute_tfr, which greatly improves speed/accuracy; units may change but this is a change in scaling factor. -
epoch_datanow uses a more robust way of determining time limits/samples to include in each epoch that no longer fails at some combinations of time limit and sampling rate -
eeg_averagereturns objects of class(eeg_evoked,eeg_epochs) - Updated R requirement to >= 3.2.0
- Updated rlang requirement to >= 0.4.0
-
compute_psdfix for single segment data - updated use of
nestandunnestin keeping withtidyr 1.0.0 -
as.data.frame.eeg_tfr()now fixed to output correctly
eegUtils 0.4.0
Function changes
- Behaviour of
as.data.framemethods changed.-
cond_labelparameter is deprecated - Information from the new
epochsstructure is now automatically added to the data.frame
-
-
tag_epochsfunction added for labelling -
run_ICAnow includes thefICApackage version offastica, and now supports running PCA before ICA. -
apply_ICAfunction added to remove ICA components. - Behaviour of
select_times()changed to use exact supplied times rather than finding nearest times in the data. - Some wrappers around
dplyrfunctions added: -
topoplot()now has agroupsparameter that allows the possibility of facetting by event labels. - more Biosemi montages added
-
events()function added to easily access and modify the events structure of alleegUtilsobjects. -
channels()function added to easily access and modify the chan_info structure of alleegUtilsobjects. -
epochs()function added to access and modify epochs structure. -
ar_eogreg()function added for removing eye movement activity using regression. -
eeg_filter()function added for a unified method of filtering using either FIR or IIR-
eeg_filter()supports use of multiple threads/cores through thefuturepackage. -
iir_filt()will be deprecated
-
-
geom_topo()extension forggplot2added. Allows plotting of a topographical scalp maps using standardggplot2functions. - Default
grid_resfor topography related plots increased to 200.
Internal changes / bug fixes
-
data.tablenow used in the following functions internally:reref_eeg()iir_filt()eeg_FASTER()
-
reref_eeg()now correctly excludes electrodes as requested. -
iir_filt()now correctly respects epoch boundaries. - New field
epochsadded toeeg_dataandeeg_epochsobjects. -
chan_infochanges to make chan_info consistent across systems. - Corrected scaling factor for PSD
-
eeg_combinenow checks and fixeseeg_datatiming consistency -
eeg_tfrobjects now use differently organised underlying matrices. -
eeg_ICAfixed unmixing matrices, which were transposed.
eegUtils 0.3.0
Function changes
-
topoplot()now has a scaling parameter to scale the size of any lines or markers drawn on the plot. -
plot_tfr()function now useable, with baseline correction also added. -
rm_baseline()now handleseeg_tfrobjects. -
as.data.frame()method added foreeg_tfrobjects. -
compute_tfr()function now available for use with Morlet wavelets. -
plot_psd()now allows changing of FFT parameters (e.g. number of FFT points, segment length) - Data selectors added for
eeg_tfrobjects (e.g.select_elecs())
Internal changes/ bug fixes
-
plot_timecourse()overhauled to be S3 method. -
plot_butterfly()reworked internally to be more efficient -
rm_baseline()simplified internally, reworked to use matrices; split to separate file. -
select_elecs()now works foreeg_evokedobjects -
eeg_decompfunction in progress for performing SSD analyses - Various methods added for TFR analyses
-
topoplot()improvements internally. Now offers potential for facetting. - Some
dplyrfunctions implemented internally for some objects.
eegUtils 0.2.1
Function changes
-
topoplot()added highlights parameter to allow specific electrodes to be highlighted. -
run_ICA()now offers extended Infomax and Fastica thanks to theicapackage -
plotlyis now a “suggested” package rather than a dependency -
plot_psd()function added to calculate and plot the PSD foreeg_epochsandeeg_dataobjects -
plot_tfr()function added to handleeeg_tfrobjects. -
erp_image()now works witheeg_ICAobjects - Generic print methods added for
eeg_epochsandeeg_data -
compute_tfr()function added to performed TFA oneeg_epochs -
epoch_data()now warns if some events are not found rather than stops. Only stops if no events are found.
Internal changes/ bug fixes
-
reref_eeg()- correctly excludes multiple named electrodes (i.e. passed as characters rather than numbers), where it previously silently failed.
- no longer records the reference data in the
ref_datafield
-
tf_morletrecoded to be called internally -
compute_psd()- recoded to call
welch_fft()in order to support possibility of different FFT methods. - now drops the DC component (frequency 0)
- recoded to call
-
welch_fft()internal function added -
eeg_downsample()now makes sure epoch length is a multiple of the downsampling factor to avoid problems with timing jitter -
erp_image()is now an S3 method -
run_ICA()- now returns source activations as a “signals” data frame, with component names
- now returns correct unmixing matrix
-
compute_csd()- added.
- computation of g-matrix and h-matrix refactored, spherical spline calculation altered accordingly
-
compute_tfr()- added
-
eeg_FASTER()now properly selects electrodes and epochs for removal
eegUtils 0.2.0
Function changes
-
as.data.frame.eeg_epochs()now has acond_labelsparameter to select epochs with specific events and add the event label as an additional column. -
as.data.frame()methods now drop thesamplecolumn. -
as.data.frame.eeg_ICA()now has acond_labelsparameter to select epochs with specific events and add the event label as an additional column. -
reref_eeg()now removes reference channels from the data. -
eeg_FASTER()- FASTER artefact rejection method now (mostly) implemented (experimental).
Internal changes / bug fixes
-
plot_butterfly()somedplyruse removed. -
run_ica()refactored SOBI method, JADE dependency removed. -
montage_check()command parses montage info when passed toelectrode_locations() -
label_check()added to help parse event labels -
proc_events()added to help parse event labels duringselect_epochs()calls -
topoplot()now tries to average/select across time/epochs before converting to long data, less memory use -
select_elecs()also removes electrodes from chan_info -
select_epochs()fixed bug whereeventsandtimingswere inconsistent when usingkeep = FALSE - Electrode/channel related functions (other than selection) now moved to
channel_management.r - New default electrode locations (347 locations in the 10-05 layout) provided
eegUtils 0.1.15
Function changes
-
eeg_evoked()class introduced to hold ERPS -
eeg_ICA()class introduced to hold ICA decompositions -
eeg_average()function to calculate averages (e.g. ERPs) fromeeg_epochsobjects -
as.data.frame.eeg_evoked()introduced to handle conversion of eeg_evoked objects to data frames.
Internal changes / bug fixes
-
compute_psd()function development, converted to S3method. -
topoplot()properly checks for existing chan_info ineeg_dataobjects -
plot_timecourse()andplot_butterfly()modified to deal witheeg_evokedobjects. -
plot_butterfly()updated to better handle data frames -
topoplot.eeg_ICA()added to make topolots from ICA components -
rm_baseline()reworked as S3 method and to be faster and much less memory intensive. -
plot_butterfly()converted to S3 method. - Initial commits for addition of Morlet wavelet time-frequency analysis
- Initial commits for statisical comparisons added
eegUtils 0.1.14
Function changes
-
eeg_downsample()function added to downsample EEG data by an integer factor. -
tag_events()function added to give labels to event codes. -
list_events()added to display unique event codes and their associated labels. -
select_epochs()now allows selection of epochs by event code or event label. -
erp_raster()- plot ERPs across the scalp as an ERP image -
eeg_combine()- combine multipleeeg_dataoreeg_epochsobjects into one
Internal changes/ bug fixes
-
eeg_epochs()now also handles downsampled data appropriately. -
select_times()no longer leaves “epoch” column ineeg_epochsobjects. -
topoplot()now calls a separate function (gam_topo()) to create GAM smooths -
browse_data()major speed-ups, no longer converts to long format until necessary. Converted to S3method. -
interactive_scalp()fixed plotting of individual electrodes
eegUtils 0.1.13
Function changes
-
interp_elecs()function to perform spherical spline interpolation of individual electrodes -
eeg_ar_thresh()simple absolute value thresholding added -
plot_electrodes()Produces a 2D or interactive 3D plot of electrode locations
eegUtils 0.1.12
Function changes
-
iir_filt()now also filters reference channels -
load_set()command added to load EEGLAB .set files
Internal changes
- Converted
select_times()to an S3 generic methodselect_times.eeg_dataselect_times.eeg_epochs
- Converted
iir_filt()to an S3 generic methodiir_filt.eeg_dataiir_filt.eeg_epochs