Many older sources describe adding the open source R project repo for xenial (16.04) to do this. That's just wrong, and will result in installation errors.
Instead, clean everything out with an "apt remove --purge", "apt autoremove", "apt update" and "apt upgrade". Then remove any line for cloud.r-project.org in /etc/apt/sources.list. Finally, add the now released repo for bionic (18.04):
sudo apt-add-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt update
sudo apt install r-base