Hi-
I think the problem is that your version of R is too old:
R version : R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
It should be at least 3.5.*, and probably on Linux even 3.6.* is standard now.
Under the Ubuntu 18.04 setup instructions, there is a description of using a startup script to update your R:
[
afni.nimh.nih.gov]
... but please note that this will purge your current R and install a newer version with the desired packages-- if you have special packages or something to save, then another route might be easier. (However, updating R and packages is often tricky; the "full removal + update of repo list + reinstall newer R" often seems the easiest.)
--pt