Now I get this error:
WARNING:root:could not open file '/etc/apt/sources.list'
I would somehow like to get my original file back, plus some good instructions about how to install R that won't corrupt it.
ok - copied old version. Looks like the version after some program copied in the sources for the R package. Now get error:
sudo apt-get update
E: Malformed entry 50 in list file /etc/apt/sources.list (absolute Suite Component)
E: The list of sources could not be read.
Here is the file - what I think are lines 49 - 51. (Got an error about too many links when I tried to include the whole file)
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ apt update sudo
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ sudo apt update
(The first and third line start with #)
Ok - now tried gedit with line numbers on as you suggested. Just deleted line 50. Now get update is running. Don't know if R will actually install but this solves the issue I posted here. How do I accept your answer? And thank you very much for all your help.