Skip to content

Does anyone know how to address the problem in using eeg_group_by()? #238

Answered by stonekate
ghzhlchen asked this question in Q&A
Discussion options

You must be logged in to vote

Ok @ghzhlchen, the problem was actually in both scripts, it's just that the filter() in the "working" script somehow disguised it. I'll use the line numbers from the "working" script: The issue was the chunks beginning at lines 29 and 49. For reasons described here, it's better not to edit the .segments tables directly. A safer version of your script would be:

# Load multiple subjects using purrr::map, extracting subject IDs from file names.
COM_list <- purrr::map(list.files("./", "vhdr"), ~
read_vhdr(.x))
# Bind all the eeg_lsts into a large one:
COM <- eeg_bind(COM_list)

#add condition and trial to .segment
events_table <- COM$.events

# generate .trial and .condition columns
result <-…

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
1 reply
@ghzhlchen
Comment options

Comment options

You must be logged in to vote
2 replies
@ghzhlchen
Comment options

@bnicenboim
Comment options

Comment options

You must be logged in to vote
10 replies
@stonekate
Comment options

@bnicenboim
Comment options

@stonekate
Comment options

@stonekate
Comment options

Answer selected by ghzhlchen
@ghzhlchen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants