apt update -qq
apt install --yes --no-install-recommends wget ca-certificates

# VC -- avoid queries on timezone

DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata

## Second: add the CRAN apt repo and key -- here we now use the mirror
wget -q -O- https://eddelbuettel.github.io/r2u/assets/dirk_eddelbuettel_key.asc \
    | tee -a /etc/apt/trusted.gpg.d/cranapt_key.asc
echo "deb [arch=amd64] https://r2u.stat.illinois.edu/ubuntu jammy main" > /etc/apt/sources.list.d/cranapt.list
apt update
## Third: ensure current R is used (could use Launchpad source or edd PPA too)
wget -q -O- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \
    | tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
echo "deb [arch=amd64] https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" > /etc/apt/sources.list.d/cran_r.list

# VC

apt install -y r-base-core
apt install -y vim

