as.data.frame | R Documentation |
Execute a dbi.table
's underlying SQL query and return the
result set as a data.frame
. By default, the
result set is limited to 10,000 rows. See Details.
## S3 method for class 'dbi.table'
as.data.frame(
x,
row.names = NULL,
optional = FALSE,
...,
n = getOption("dbi_table_max_fetch", 10000L)
)
x |
a |
row.names |
a logical value. This argument is not used. |
optional |
a logical value. This argument is not used. |
... |
additional arguments are ignored. |
n |
an integer value. When nonnegative, the underlying SQL query includes a
'LIMIT |
By default, as.data.frame
returns up to 10,000 rows (see the
n
argument). To override this limit, either call
as.data.frame
and provide the n
argument (e.g., n = -1
to return the entire result set), or set the option
dbi_table_max_fetch
to the desired default value of n
.
a data.frame
.
as.data.frame
(the generic method in the
base package).
duck <- chinook.duckdb()
Artist <- dbi.table(duck, DBI::Id("Artist"))
as.data.frame(Artist, n = 7)[]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.