,
NEWS.md
dplyr and tidyr move from Imports to Suggests, so installing eeguana no longer installs them. The dplyr verbs still work on eeguana objects whenever dplyr is installed, because their methods are registered as soon as dplyr loads, whichever of the two packages loads first.
Examples and vignettes no longer load dplyr. The vignettes, and the one example that uses a verb from outside eeguana, load tidytable instead, a faster alternative.
purrr is no longer a dependency. ## Bugs fixed
drop_incomplete_segments() errored with could not find function "na.omit" on every call. It now drops the segments holding missing values, as documented.
transmute() on an events table errored with object 'transmute.tidytable' not found, because the tidytable method it called was removed upstream.
plot_topo() accepts any data frame. It previously had a method only for tibbles, so a plain data.frame had none.
read_vhdr() now checks the .dat against its header before reading it. A file that is too short, usually an incomplete copy or download, stops with both sizes named instead of failing inside data.table with Supplied 38410 items to be assigned to 38409 items of column '.id'. A file that is too long warns and is read in full.
eeg_interpolate_tbl() returns a tidytable rather than a tibble. It is still a data frame, so it keeps working wherever one is expected, but a test such as inherits(x, "tbl_df") on the result is now FALSE.Key: line.eeg_lst go through eeguana’s own eeg_* generics.dev/check_without_dplyr.R runs the package on a library where dplyr, tidyr, and tibble are not installed.::: any more. One such call had already broken transmute() on events tables when tidytable removed the function.read_edf() gains .trigger_channel, for EDF files that record triggers as an ordinary channel rather than as annotations. Name the channel, or use "last" for the last one. Its values become events and it is dropped from the signal table. When the argument is left out and the last channel looks like triggers, a message says so.read_ft() and read_set() failed with invalid substring arguments on files with an empty text field. The cause is a regression in R.matlab 3.8.0; Remotes: points at R.matlab’s development version until the fix reaches CRAN.read_fif() and as_eeg_lst() on an MNE object no longer fail with KeyError: 'bad'.copy in dplyr’s position, so left_join(x, y, by, copy) no longer lands on suffix, and semi_join()/anti_join() no longer reject copy. copy and extra arguments are ignored with a warning.keep = NULL, dplyr’s default for the joins, no longer errors. keep = TRUE warns and is ignored: it would split .id, which ties the signal, events and segments tables together.ungroup(x = data) works. The method took its first argument as .data while dplyr’s generic calls it x.annotate_events() no longer warns about ggplot2’s deprecated %+%.eeg_summarize() and the validate_*_tbl() functions against a data.table::setcolorder() bug affecting tables with 64 or more columns. The validators now return their table instead of working by reference.NAMESPACE; no change to the public API.dev/README.md.could not find function "across." error fixed (thanks @prattems)chs_mean method for psd_list objects.read_fif() function to read fif files created by MNE Python.install_py_eeguana() function to install the necessary Python packages for reading fif files.channel_dbl and sample_int classes.annotate_events() function to allow plotting even if there are no events.annotate_electrodes() to add electrode labels to a topographic plot. (Previously this was done with geom_text()).window was odd.as_eeg_lst() makes eeg_lst objects created with previous versions of eeguana compatible with the current version..ref of eeg_rereference() now allows “tidyselect”.
write_vhdr() writes BrainVision 2.0 files (experimental).eeg_psd() computes the power spectral density (PSD) of a en EEG signal (using only the Welch method for now).eeg_band_power() computes power bands.na_omit() removes NA values from eeg_lst objects.as_tidytable() added.sampling_rate() shows the sampling rate of an object.eeg_unsegment() was added.channels_tbl() is much faster now.gsignal package..all_chs of eeg_events_to_NA was deprecated in favor of the more flexible .n_chs._at, _if, _all functions don’t work anymore. Now one should use the new across() (or across_ch()) notation. If your code doesn’t work anymore and you don’t know how to fix it, please post it in https://github.com/bnicenboim/eeguana/discussions
i...) rather than dplyr notation. This might affect the join family and eeg_segment.eeg_ prefix (e.g., eeg_mutate, eeg_filter), they still work without the prefix (for now).stringr
eeg_lst, the segments table is a data.table rather than a tibble and they depend on tidytable
plot_components() behaves more similarly to plot_topo()
... are always the second argument and most arguments require now a . at the beginning: This should help to differentiate them from channels.scale works properly for channels nowsig_fft(), sig_ifft().read_edf() wasn’t reading events from the status channel.reference argumentdrop_incomplete_segments() added.eeg_segment() accepts unpaired events when end argument is used, and should be able to deal with duplicated triggers.eeg_artif_peak() detect peaks in the EEG signal.eeg_ica_cor_tbl() and eeg_ica_var_tbl show the correlation of components (ICA) with EOG channels and their variance explained.eeg_ica_summary_tbl() summarizes eeg_ica_cor_tbl() and eeg_ica_var_tbl().events_tbl() keep attributes.eeg_ica().eeg_artif_*().signal_tbl(), events_tbl(), and segments_tbl().eeg_lst objects.as_tibble().as.data.table() was added.eeg_intervals_to_NA() was renamed to eeg_events_to_NA().events() was renamed to events_tbl().plot_gg() should be changed to ‘ggplot(aes(x=.time, y=.value))’.summarize_all_ch(...) should be changed to summarize_at(channel_names(.),...).summarize_at_ch(...) should be changed to summarize_at(...).ch_filt_*() functions were renamed to eeg_filt_*() and they get a ... argument to select the relevant channels.ch_baseline() was renamed to eeg_baseline().segment() was renamed to eeg_segment()
downsample() was renamed to eeg_downsample()
interpolate_tbl() was renamed to eeg_interpolate_tbl()
plot_in_layout() to place facets in the electrode layout was added.plot_topo() has improved colors, and does “less”, geom_contour and geom_text need to be added.annotate_head() was added to the plot functions.change_coord() was added as an auxiliary function to change the coordinate system for topographic or layout plots.read_edf() was added.channel_names() was fixed.chs_fun() to apply arbitrary functions to the channels.segment() accepts initial and final segments.summarize adds a summarize_n column.events function to visualize and edit events was added.ch_rereference updates the relevant attributes.mutate recognize better channels.*_join functions fixed.