I used the following steps to install R on my Ubuntu 18.04, but encountered problem:
usr@dell:~$ history
1141 sudo apt-get remove --auto-remove r-base
1142 sudo apt-get purge r-base
1143 sudo apt-get purge --auto-remove r-base
1144 sudo apt-get remove --auto-remove r-base
1145 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
1146 sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
1147 sudo apt update
1148 apt list --upgradable
1149 sudo apt install r-base
1150 sudo -i R
1151 deluser --remove-home shiny
1152 R
usr@dell:~$ R
/usr/local/bin/R: line 238:
/usr/local/lib/R/etc/ldpaths: No such file or directory
/usr/local/bin/R: line 261: /usr/local/lib/R/bin/exec/R: No such file or directory
I tried to remove previous R version, but the problem is still the same. Could anyone please help me? Thanks in advance.