BergelsonLab / BergelsonLab/blabr

allow for recordings without fixations in `merge_split_reports`

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
bug eyetracking
Dominant language
R
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

We already do this for fixation-less trials, we just need to extend it to fixation-less recordings.

This came up in [01_wrangling.Rmd of the DiSCo part of the DiSCo-HaT project](https://github.com/BergelsonLab/ht_seedlings/blob/master/DiSCo/data_prep/01_wrangling.Rmd). There, we worked around the issue by dropping those recordings from the message report tables like this:

```
drop_recordings_from_tables <- function(data_table_list, recording_ids) {
# drop recording by recording_id if recording_id is a column
data_table_list %>%
modify_if(
~ 'recording_id' %in% colnames(.x),
~ .x %>% filter(!recording_id %in% recording_ids))
}

recordings_without_fixations <- c('d071', 'D302')

data_tables_raw <- merge_split_reports(
fix_rep_data,
mes_rep_data %>%
drop_recordings_from_tables(recordings_without_fixations))
```

Contributor guide

Open the contributing guide

Research direction

Start at the merge_split_reports entry point and compare its existing handling of fixation-less trials with the case of recordings without fixations. Use the 01_wrangling.Rmd example and the recordings_without_fixations workaround as context; done means those recordings are retained by merge_split_reports without needing to be dropped from message report tables.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.