in conducting a meta-analysis (of MRI data) I am running into the repeated issue:
Error: Assigned data `single_study_df` must be compatible with existing data. ? Error occurred for column `accumbens_sd`. x Can't convert from <double> to <logical> due to loss of precision. * Locations: 1, 2. Run `rlang::last_error()` to see where the error occurred.
This follows the commands
for (region in regions){
for (study in unique(df$studyid)){
single_study_df <- df %>% filter(studyid==study)
if (is.na(single_study_df[sprintf('%s_mn', region)][[1]]) & !is.na(single_study_df[sprintf('%s_mn_l', region)])){
df <- calc_bilat(study, region, r, df)
}
}
}
My colleague (cc'd) believed it may be an issue with tidyverse version, however using an older version (1.2.1), the issue persists. note 'accumbens' is the first of many columns so I suspect this is why it flags this up.
I would greatly value your input on this matter
Kind regards
John Tully