sqlData | R Documentation |
This is a generic method that coerces R objects into vectors suitable for upload to the database. The output will vary a little from method to method depending on whether the main upload device is through a single SQL string or multiple parameterized queries. This method is mostly useful for backend implementers.
\Sexpr[results=rd,stage=render]{DBI:::methods_as_rd("sqlData")}sqlData(con, value, row.names = NA, ...)
con |
A database connection. |
value |
A data frame |
row.names |
Either If A string is equivalent to For backward compatibility, |
... |
Other arguments used by individual methods. |
The default method:
Converts factors to characters
Quotes all strings with dbQuoteIdentifier()
Converts all columns to strings with dbQuoteLiteral()
Replaces NA with NULL
con <- dbConnect(RSQLite::SQLite(), ":memory:")
sqlData(con, head(iris))
sqlData(con, head(mtcars))
dbDisconnect(con)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.