bnicenboim / eeguana

A package for manipulating EEG data in R.
https://bnicenboim.github.io/eeguana/
Other
21 stars 9 forks source link

Error when marking artifacts #213

Closed stonekate closed 1 year ago

stonekate commented 2 years ago

Hey Bruno,

I have gotten a novel error when marking artifacts and am not sure how to interpret it (I don't think it's from eeguana, but I'm not sure what eeguana does that elicits it). Any ideas? (this is not the INHIBIT data and is separate to the other issue I'm working on). It's only specifically for this one subject and only since the last eeguana update.

dat_ica <- readRDS("Dropbox/kate_eeg_data/5_ica.rds")

dat_seg <- dat_ica %>%
          eeg_segment(lead(.description %in% c("S200"), 2) & .type == "Stimulus", .lim = c(-0.2, 1))

dat_art <- dat_seg %>%
      eeg_artif_minmax(-HEOG, -VEOG, -LO1, .threshold = 100, .window = 150, .unit = "ms") %>%
      eeg_artif_step(-HEOG, -VEOG, -LO1, .threshold = 50, .window = 150, .unit = "ms")

image

bnicenboim commented 2 years ago

it seems this is eeguana's issue. Is the file in the dropbox? I'll look at it

stonekate commented 2 years ago

oh, yep it's there

stonekate commented 1 year ago

In the end I think this was my issue - I think there was a missing end-of-sentence marker for one sentence so that .id had a .sample marked NA. When eeg_artif_minmax tried to find the min() and max() .sample, it failed because the vector contained an NA. I don't think you need to do anything.