#' 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)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.