as.dbi.table | R Documentation |
Test whether an object is a dbi.table
, or coerce it if possible.
is.dbi.table(x)
as.dbi.table(conn, x, type = c("auto", "query", "temporary"))
x |
any R object. |
conn |
a connection handle returned by |
type |
a character string. Possible choices are |
Two types of tables are provided: Temporary (when
type == "temporary"
) and In Query
(when type == "query"
). For Temporary, the data are
written to a SQL temporary table and the associated
dbi.table
is returned. For In Query, the data are
written into a CTE as part of the query itself - useful when the
connection does not permit creating temporary tables.
a dbi.table
.
The temporary tables created by this function are dropped
(by calling dbRemoveTable
) during garbage
collection when they are no longer referenced.
duck <- dbi.catalog(chinook.duckdb)
csql(as.dbi.table(duck, iris[1:4, 1:3], type = "query"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.