Description Usage Arguments Value Examples
This standard method works for all sql sources.
1 2 3 4 |
dest |
remote data source |
df |
local data frame |
name |
name for new remote table. |
types |
a character vector giving variable types to use for the columns. See http://www.sqlite.org/datatype3.html for available types. |
temporary |
if |
unique_indexes |
a list of character vectors. Each element of the list will create a new unique index over the specified column(s). Duplicate rows will result in failure. |
indexes |
a list of character vectors. Each element of the list will create a new index. |
analyze |
if |
... |
other parameters passed to methods. |
a sqlite tbl
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | if (requireNamespace("RSQLite")) {
db <- src_sqlite(tempfile(), create = TRUE)
iris2 <- copy_to(db, iris)
mtcars$model <- rownames(mtcars)
mtcars2 <- copy_to(db, mtcars, indexes = list("model"))
explain(filter(mtcars2, model == "Hornet 4 Drive"))
# Note that tables are temporary by default, so they're not
# visible from other connections to the same database.
src_tbls(db)
db2 <- src_sqlite(db$path)
src_tbls(db2)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.