knitr::opts_chunk$set(echo = TRUE)
# Especificamos las librerías necesarias en esta lista

packages = c()

#use this function to check if each package is on the local machine
#if a package is installed, it will be loaded
#if any are not, the missing package(s) will be installed and loaded
package.check <- lapply(packages, FUN = function(x) {
  if (!require(x, character.only = TRUE)) {
    install.packages(x, dependencies = TRUE)
    library(x, character.only = TRUE)
  }
})

#verify they are loaded
search()


Jorgvt/RTemplate documentation built on May 3, 2022, 12:03 a.m.