R/my_libs.R

Defines functions my_libs

Documented in my_libs

#' Attach packages
#'
#' Either only tidyverse and lubridate or also DBI, odbc and dbplyr.
#'
#' @param with_con TRUE if I want to use a database.
#'
#' @return Attaches libraries.
#' @export
#'
my_libs <- function(with_con = TRUE){

  if(with_con == TRUE){
    purrr::map(c("tidyverse", "lubridate", "dbplyr", "DBI", "odbc"), library,  character.only =TRUE)
  }
  else {

    purrr::map(c("tidyverse", "lubridate"), library,  character.only =TRUE)

  }

    }
davidbaniadam/conStart documentation built on Sept. 9, 2019, 6:15 a.m.