R init script

Install and load packages

list.of.packages <- c("tidyverse")

new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if (length(new.packages)) install.packages(new.packages)

lapply(list.of.packages,function(x){library(x, character.only = TRUE, warn.conflicts = FALSE,
                                            quietly = TRUE, verbose = FALSE)}) 

remove(list.of.packages, new.packages)