R: Cannot install rJava; what is r-api-3.4?

I guess the issue is that, when you were trying to install r-cran-rjava, it required you to have R 3.4 on your system (i.e. the version of the official Ubuntu repositories) rather than R 3.5.

It looks like this can be an issue for other packages, like rkward for example (it also asks for r-api-3.4 and can't resolve the dependency).

To fix that, you might have to add an extra PPA that provides newer version of extra R packages for the 3.5 branch, like Michael Rutter's cran2deb4ubuntu_3.5, which seems to be the reference. (It currently contains r-cran-rjava in its version 0.9-10-3cran1ppa0bionic0)

This might do the trick:

sudo add-apt-repository ppa:marutter/c2d4u3.5
sudo apt update
sudo apt install r-cran-rjava