hmm...
I ran into the data.table problem on 10.15 as well.
I solved it by installing it manually from within the R GUI (not R studio or command line)
I think that the R libraries must be getting installed in separate places for all of the different versions of R.
Try installing all of the necessary libraries in all of your R instances.
You can find the library location with
.Library
I think for basic afni stuff you need:
'afex','phia','snow','nlme','lme4','paran','brms'
and data.table is a requirement for some of them.
Try installing data.table first.
thanks, Justin