update calculate_missing_data to pass number of expected trials
Added a new parameter total_trials_expected to the clean_missing_data function, allowing users to specify the total number of trials expected for participants when calculating the proportion of missing trials. If this parameter is left as NULL, the proportion is calculated based on the actual number of trials in the data (as before).
Mentioned in #29 for tracking
The clean_missing_data function provides a simple and effective way to reject subjects and trials based on missing data. Currently, subjects are rejected based on the percentage of good trials in the data. However, I believe it would be good to allow users to specify the expected number of total trials for the participants, which could then be used to calculate the percentage of good trials. By default, the function should continue to use the data as it does currently, calculating the percentage based on the available trials.
This would be especially useful in developmental research, where the number of trials often varies due to sessions being interrupted at different points. By passing the expected number of total trials, the function could be used more effectively to reject subjects based on a consistent criterion, independent of the variability in trial counts across participants.
#29