Description Usage Arguments Examples
Use src_monetdb
to connect to an existing MonetDB database,
and tbl
to connect to tables within that database. Please note that the ORDER BY, LIMIT and OFFSET keywords
are not supported in the query when using tbl
on a connection to a MonetDB database.
If you are running a local database, you only need to define the name of the database you want to connect to.
1 2 3 4 | src_monetdb(dbname, host = "localhost", port = 50000L, user = "monetdb",
password = "monetdb", con=FALSE, ...)
src_monetdblite(dbdir = tempdir(), ...)
|
dbname |
Database name |
host,port |
Host name and port number of database (defaults to localhost:50000) |
user,password |
User name and password (if needed) |
con |
Existing DBI connection to MonetDB to be re-used |
... |
for the src, other arguments passed on to the underlying
database connector, |
dbdir |
a directory to start MonetDBLite in |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(dplyr)
# To connect to a database first create a src:
dbdir <- file.path(tempdir(), "dplyrdir")
my_db <- MonetDBLite::src_monetdblite(dbdir)
# copy some data to DB
my_iris <- copy_to(my_db, iris)
# create table object
my_iris2 <- tbl(my_db, 'iris')
# now you can call regular dplyr methods on table object
# ...
# shut down the database
MonetDBLite::monetdblite_shutdown()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.