UPDATE IN RESPONSE TO JOHANNES' SUGGESTION:
I tried some things yesterday, and they didn't work. For example, I tried install.packages(rstanarm) and got, among other things:
/usr/lib/R/etc/Makeconf:168: recipe for target 'lang__grammars__expression_grammar_inst.o' failed make: *** [lang__grammars__expression_grammar_inst.o] Error 1 ERROR: compilation failed for package ‘rstan’
- removing ‘/usr/local/lib/R/site-library/rstan’ ERROR: dependencies ‘PKI’, ‘RCurl’ are not available for package ‘rsconnect’
- removing ‘/usr/local/lib/R/site-library/rsconnect’ ERROR: dependency ‘igraph’ is not available for package ‘threejs’
- removing ‘/usr/local/lib/R/site-library/threejs’ ERROR: dependencies ‘rsconnect’, ‘rstan’, ‘threejs’ are not available for package ‘shinystan’
- removing ‘/usr/local/lib/R/site-library/shinystan’ ERROR: dependencies ‘rstan’, ‘shinystan’ are not available for package ‘rstanarm’
- removing ‘/usr/local/lib/R/site-library/rstanarm’
The downloaded source packages are in ‘/tmp/RtmpYtjSD9/downloaded_packages’ Warning messages: 1: In install.packages("rstanarm") : installation of package ‘PKI’ had non-zero exit status 2: In install.packages("rstanarm") : installation of package ‘RCurl’ had non-zero exit status 3: In install.packages("rstanarm") : installation of package ‘igraph’ had non-zero exit status 4: In install.packages("rstanarm") : installation of package ‘rstan’ had non-zero exit status 5: In install.packages("rstanarm") : installation of package ‘rsconnect’ had non-zero exit status 6: In install.packages("rstanarm") : installation of package ‘threejs’ had non-zero exit status 7: In install.packages("rstanarm") : installation of package ‘shinystan’ had non-zero exit status 8: In install.packages("rstanarm") : installation of package ‘rstanarm’ had non-zero exit status
I'm guessing that could be because I've now got a mix of packages.
Unless you say otherwise and when I get time, I'm inclined to use aptitude delete to get rid of all the R packages, leave sources.list pointing to the Debian backport, and then use install.packages() and update.packages() to build up my system on top of the backported (3.4.2?) base R. Does that sound safe and likely effective?