View source: R/postgresql_uploader.R
postgresql_uploader | R Documentation |
postgresql_uploader
is a convenience function to upload contents of a data.frame
object into an exsisting PostgreSQL table. The table must first be created on the PostgreSQL
backend (via "CREATE TABLE ...
") before postgresql_uploader
is used.
killConnections
disconnects all PostgreSQL connections.
postgresql_uploader(
con,
r_df,
pg_table = deparse(substitute(r_df)),
unique.field.names,
update = TRUE,
clean_r_df = TRUE
)
killConnections()
con |
a |
r_df |
data.frame to be uploaded; must contain identical column names to |
pg_table |
character specifying existing PostgreSQL table name; the referred table on the
PostgreSQL backend must have the same column names as |
unique.field.names |
character specifying unique column names as defined in PostgreSQL table constraints
(i.e. primary key); please note, that column names of |
update |
logical, specifying whether to update existing entries as defined by |
clean_r_df |
logical, specifying whether to clean |
postgresql_uploader
returns a list
with information about effected inserts and updates
killConnections
has no return; its side effect is described above
dbConnect
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.