,
This function will transform the channels according to the independent components that are kept or removed.
eeg_ica_keep(.data, ...)
An eeg_ica_lst object
Components to keep from the mixing matrix of the ICA transformation. See dplyr::select and tidyselect::select_helpers for details.
Other preprocessing functions:
eeg_baseline()
,
eeg_downsample()
,
eeg_ica()
,
eeg_rereference()
,
eeg_segment()
,
filt
Other ICA functions:
eeg_ica_cor_tbl()
,
eeg_ica_show()
,
eeg_ica_summary_tbl()
,
eeg_ica_var_tbl()
,
eeg_ica()
,
plot_components()
# For demonstration only, since ICA won't converge
# Suppressing an important warning:
suppressWarnings(data_faces_10_trials %>%
eeg_ica(-EOGH, -EOGV, -M1, -M2, .method = fast_ICA, .config = list(maxit = 10))) %>%
eeg_ica_keep(-ICA1)
#> # ICA is being done using fast_ICA...
#> # ICA finished in 9 iterations. With a tolerance of 0.753226. (Maximum expected tolerance: 1e-06.)
#> # ICA took 0.7 secs
#> # EEG data:
#>
#> # Signal table:
#> Key: <.id, .sample>
#> .id .sample Fp1 Fpz Fp2
#> <int> <sample_int> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: 1 15000 -35.85824 -5.127569 -8.123731529
#> 2: 1 15001 -31.74557 -13.222450 -7.058782723
#> 3: 1 15002 -28.39267 -18.129568 -4.092016062
#> 4: 1 15003 -28.16708 -18.678831 -1.724518210
#> 5: 1 15004 -30.16313 -17.112465 0.003886853
#> ---
#> 43325: 1 58324 -18.70356 -13.688070 -9.754417031
#> 43326: 1 58325 -19.18309 -13.152318 -9.355798918
#> 43327: 1 58326 -18.47598 -13.684482 -10.031258047
#> 43328: 1 58327 -16.65750 -14.512601 -11.127688233
#> 43329: 1 58328 -15.21014 -14.959274 -11.657639756
#> F7 F3 Fz F4 F8
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: -7.0971541 -11.493054 -0.124334 3.3943371 3.734473
#> 2: 0.1686932 -10.989526 -3.625859 -0.6475149 6.037230
#> 3: 6.3628803 -7.971050 -6.559622 -2.8325464 7.154787
#> 4: 8.6464135 -6.536031 -7.549415 -2.7004227 6.825912
#> 5: 8.1431340 -5.698296 -6.902363 -1.2419532 7.350362
#> ---
#> 43325: 1.1723282 -9.345127 -7.226108 -5.8688674 -9.762481
#> 43326: 0.1844094 -8.402654 -6.451281 -4.2341457 -9.217804
#> 43327: -0.2346117 -8.408916 -5.942823 -3.3457894 -8.199721
#> 43328: -0.2436727 -8.914050 -6.112564 -2.4500282 -6.812772
#> 43329: -0.1289588 -9.150099 -6.120054 -1.9479884 -5.562897
#> FC5 FC1 FC2 FC6 M1
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: 0.515714 -8.7046025 0.4162025 17.7808089 -1.8668146
#> 2: 3.646915 -8.4604916 -3.8597749 1.8809824 -3.2960243
#> 3: -1.713336 -6.6991118 -7.7217821 -7.2243194 -3.7450671
#> 4: -7.214086 -6.2950657 -9.2624732 -6.3843153 -3.7946916
#> 5: -5.258135 -6.6017707 -8.5607816 -0.9317791 -3.2719884
#> ---
#> 43325: -4.514570 -0.1258273 -2.5482249 -10.0265747 0.8050708
#> 43326: -6.824839 0.6447183 -1.2579454 -7.9661435 0.9832335
#> 43327: -5.379410 1.1017901 -0.7205570 -6.2077238 1.2051768
#> 43328: -1.309106 -0.2811450 -1.1982858 -4.9652733 1.4103985
#> 43329: 3.858781 -1.8094475 -1.5800845 -4.5640639 1.1627738
#> T7 C3 Cz C4 T8
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: -16.353103 -9.9316476 -13.9206389 7.7090256 -23.9292676
#> 2: -8.363491 -8.1151655 -12.9073716 3.8549837 -4.1260165
#> 3: -4.139814 -2.6714452 -12.0577339 0.3545431 12.1980638
#> 4: -8.550033 0.8131357 -13.7068126 -0.4188360 12.1972277
#> 5: -14.064331 0.2645815 -15.7796960 0.1981257 5.3433145
#> ---
#> 43325: 1.327261 2.7892799 -2.2779431 -6.4010129 -4.2981409
#> 43326: 1.478051 3.8302981 -0.8535727 -4.7776396 -4.2292664
#> 43327: 1.845411 4.2348596 0.4205301 -3.4140310 -0.2114828
#> 43328: 1.988747 1.4062189 -0.3929989 -4.0598382 4.2271973
#> 43329: 1.903195 -2.2189491 -1.8331256 -4.4890467 6.2348709
#> M2 CP5 CP1 CP2 CP6
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: 1.8668146 -0.9834742 -17.270059 -8.977968 7.089367
#> 2: 3.2960243 -1.2049069 -15.590132 -8.280125 10.930635
#> 3: 3.7450671 1.2051342 -12.828537 -7.141820 14.533386
#> 4: 3.7946916 5.5008905 -12.324654 -7.657651 16.810301
#> 5: 3.2719884 8.0694523 -13.631766 -9.236951 14.834535
#> ---
#> 43325: -0.8050708 5.5393325 3.402107 -6.136933 -13.117906
#> 43326: -0.9832335 5.3716551 4.347144 -4.573331 -10.356085
#> 43327: -1.2051768 5.0231788 5.022099 -3.195943 -7.584139
#> 43328: -1.4103985 3.1623498 3.313963 -4.177520 -6.990591
#> 43329: -1.1627738 1.3852170 1.141952 -5.560244 -6.798565
#> P7 P3 Pz P4 P8
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: 0.8658306 -5.9824260 -12.0023204 -5.424498 -12.7620990
#> 2: 0.9524144 -6.5691054 -11.5195868 -3.667459 -6.2500177
#> 3: 2.3930693 -5.8108202 -10.8131869 -1.963768 -0.8576681
#> 4: 4.5841004 -4.6540240 -11.9543129 -2.066176 -0.5931517
#> 5: 5.6063892 -4.6718262 -13.9597350 -4.290757 -4.4166657
#> ---
#> 43325: 8.0651251 3.7712330 -1.8790325 -8.761819 -9.9398847
#> 43326: 7.2408625 3.6109170 -0.8493547 -7.086848 -8.3573945
#> 43327: 5.2807262 3.2761311 0.3187471 -4.945667 -5.2836289
#> 43328: 2.8909369 0.6274096 -0.8436627 -4.623661 -3.4018419
#> 43329: 1.4435990 -2.0337226 -2.6307967 -4.990397 -2.8685845
#> POz O1 Oz O2 EOGV
#> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl> <channel_dbl>
#> 1: -14.876782488 -12.6196652 -16.1549766 -15.7771579 -205.85693
#> 2: -12.735378291 -9.3482220 -11.7184087 -10.9459670 -214.15259
#> 3: -11.115043465 -6.5474165 -8.4701656 -7.2959295 -220.57965
#> 4: -11.912311410 -5.6568780 -8.9601805 -7.8778485 -218.24934
#> 5: -14.510879685 -8.0377348 -13.6078268 -12.6219637 -217.16670
#> ---
#> 43325: -2.593559164 2.9531567 -3.6421351 -7.0550022 18.41424
#> 43326: -1.551622493 2.6540477 -2.6465721 -5.4412932 19.22052
#> 43327: -0.003999168 1.8685121 -0.9850286 -2.4107870 19.74028
#> 43328: -0.477236567 0.2776762 -0.4805953 -0.4707631 19.20309
#> 43329: -1.710281407 -0.6379125 -0.7082199 -0.2672344 18.72752
#> EOGH
#> <channel_dbl>
#> 1: 164.320831
#> 2: 158.389755
#> 3: 157.559784
#> 4: 162.165161
#> 5: 168.559723
#> ---
#> 43325: 6.434383
#> 43326: 7.837689
#> 43327: 8.659687
#> 43328: 8.609533
#> 43329: 8.829977
#>
#> ## Events table:
#> Index: <.type>
#> .id .type .description .initial .final .channel
#> <int> <char> <char> <sample_int> <sample_int> <char>
#> 1: 1 Bad Interval Bad Min-Max 15000 15128 FC6
#> 2: 1 Bad Interval Bad Min-Max 15000 15146 F8
#> 3: 1 Bad Interval Bad Min-Max 15000 15142 Fp1
#> 4: 1 Bad Interval Bad Min-Max 15000 15132 Fp2
#> 5: 1 Bad Interval Bad Min-Max 15000 15140 Fpz
#> ---
#> 540: 1 Bad Interval Bad Min-Max 55058 55400 Fpz
#> 541: 1 Bad Interval Bad Min-Max 55077 55314 F8
#> 542: 1 Stimulus s130 56380 56380 <NA>
#> 543: 1 Stimulus s70 56750 56750 <NA>
#> 544: 1 Stimulus s130 58328 58328 <NA>
#>
#> # ICA:
#> # Component_names:ICA2, ICA3, ICA4, ICA5, ICA6, ICA7, ICA8, ICA9, ICA10, ICA11, ICA12, ICA13, ICA14, ICA15, ICA16, ICA17, ICA18, ICA19, ICA20, ICA21, ICA22, ICA23, ICA24, ICA25, ICA26, ICA27, ICA28, ICA29, ICA30
#> # Channels_used: Fp1, Fpz, Fp2, F7, F3, Fz, F4, F8, FC5, FC1, FC2, FC6, T7, C3, Cz, C4, T8, CP5, CP1, CP2, CP6, P7, P3, Pz, P4, P8, POz, O1, Oz, O2
#>
#> # Segments table:
#> Key: <.id>
#> .id .recording segment
#> <int> <char> <int>
#> 1: 1 faces.vhdr 1