R/setSQL.R

Defines functions setSQL

Documented in setSQL

setSQL = function(bathy, header = TRUE, sep = ",", db.name = "bathy_db"){

	# prepare ("connect") SQL database
	con <- DBI::dbConnect(RSQLite::SQLite(), dbname = db.name)
	# data frame -> database table.
	DBI::dbWriteTable(con, name="bathy_db", value=bathy, header=header, sep=sep)

}

Try the marmap package in your browser

Any scripts or data that you put into this service are public.

marmap documentation built on March 31, 2023, 6:59 p.m.