readwritesqlite (version 0.0.1)

rws_write.data.frame: Write a Data Frame to a SQLite Database

Description

Write a Data Frame to a SQLite Database

Usage

# S3 method for data.frame
rws_write(x, exists = TRUE, delete = FALSE,
  replace = FALSE, meta = TRUE, log = TRUE, commit = TRUE,
  strict = TRUE, x_name = substitute(x),
  silent = getOption("rws.silent", FALSE), conn, ...)

Arguments

x

A data frame.

exists

A flag specifying whether the table(s) must already exist.

delete

A flag specifying whether to delete existing rows before inserting data. If meta = TRUE the meta data is deleted.

replace

A flag specifying whether to replace any existing rows whose inclusion would violate unique or primary key constraints.

meta

A flag specifying whether to preserve meta data.

log

A flag specifying whether to log the table operations.

commit

A flag specifying whether to commit the operations (calling with commit = FALSE can be useful for checking data).

strict

A flag specifying whether to error if x has extraneous columns or if exists = TRUE extraneous data frames.

x_name

A string of the name of the object.

silent

A flag specifying whether to suppress messages and warnings.

conn

A '>SQLiteConnection to a database.

...

Not used.

See Also

Other rws_write: rws_write.environment, rws_write.list, rws_write

Examples

Run this code
# NOT RUN {
conn <- rws_connect()
rws_list_tables(conn)
rws_write(rws_data, exists = FALSE, conn = conn)
rws_write(rws_data, x_name = "moredata", exists = FALSE, conn = conn)
rws_list_tables(conn)
rws_disconnect(conn)
# }

Run the code above in your browser using DataCamp Workspace