R/setupSQLite.R

#functions to import raw text files to a SQLite database

#' Connect to or create a RSQlite connection
#'
#' 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=system.file('extdata/toy.db', package="CancerCellLines") ) {
  drv <- RSQLite::SQLite()
  con <- DBI::dbConnect(drv, dbname = dbpath)
  return(con)
}
chapmandu2/CancerCellLines documentation built on May 13, 2019, 3:27 p.m.