R/setupSQLite.R

#' Connect to or create a SQlite databas
#'
#' This function connects to or creates if necessary a SQLite database and returns a SQLiteConnection object.
#'
#' @param dbpath The path of the database
#' @return A \code{SQLiteConnection} object
#' @export
setupSQLite <- function ( dbpath=tempfile() ) {
  drv <- RSQLite::SQLite()
  con <- DBI::dbConnect(drv, dbname = dbpath)
  return(con)
}
chapmandu2/CollateralVulnerability2016 documentation built on May 13, 2019, 3:27 p.m.