add a dataframe, optionally purging related obsolete records, to a SQLite database

update_status_db(
  sqlite_filename,
  tablename,
  dropfield = NULL,
  dropvalue,
  newdf
)

Arguments

sqlite_filename

character(1) filename of SQLite database; database must exist

tablename

character(1) name of table to operate on

dropfield

character(1) or NULL, the field used to select records to delete

dropvalue

character(1) only used if dropfield is not NULL, value used to select records for deletion

newdf

data.frame conforming to the table in tablename if such exists

Note

Connects to db with flag SQLITE_RW and disconnects on exit.