write_tbl | R Documentation |
Functions to write a table to a database.
write_tbl(
dat = NULL,
schema = NULL,
tbl = NULL,
key = NULL,
comment_str = NULL,
overwrite = TRUE,
drv,
dbname,
cred_file = NULL,
...,
quiet = FALSE
)
dat |
data.frame, data.table or tibble. |
schema |
database schema. |
tbl |
database table. |
key |
Set a primary key in table? |
comment_str |
Add a comment to table? Recommended. |
overwrite |
Should an existing database table be overwritten? TRUE (default). |
drv |
A database driver. |
dbname |
The database name. |
cred_file |
An .R file containing the necessary credentials to connect to a different databases (e.g. PostgreSQL). Can contain variables: user, host, port, password, dbname. |
... |
Arguments passed on to |
quiet |
Quiet function call? |
Andreas Scharmueller, andschar@proton.me
# connection to database required
read_query(query = "SELECT * FROM schema.table LIMIT 1;",
cred_file = cred.R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.