I think the only R packages available through the Ubuntu repos are the packages maintained by the R development core team. Like with most packages, those available through
apt or synaptic are not always the newest versions. Luckily you have the option of adding a CRAN-maintained software source by creating a new file at
/etc/apt/sources.list.d/CRAN.list that contains a single line of text:
deb http://cran.r-project.org/bin/linux/ubuntu trusty/
trusty/ with your distribution's codename; if you don't know it type
lsb_release -c into a terminal). After that (and an
apt update) your package manager will always install (or update to) the CRAN-maintained versions of
r-base-core, etc., because they will have higher version numbers than the ones in the debian sources. See here if
apt complains about the repo being unsigned.
For all other packages (AKA "contributed packages"), I prefer to install within R via
install.packages(c("name_of_package", "name_of_other_package")) whenever possible, unless I know for a fact that the version on CRAN is old and that a newer version has functionality that I need. In such cases you can install from GitHub with
devtools::install_github('AccountName/RepositoryName') or download an archive and install it from a terminal window via
R CMD INSTALL name_of_package.tar.gz, or within R via
install.packages("/path/to/downloaded/package.tar.gz", repos=NULL, type="source").
For completeness, here is the official guidance from CRAN.