MonetDB.R - MonetDB to R Connector

MonetDB.R is a R extension to connect the Open-Source database MonetDB with R. Using this extension, data that is stored can be used in R analyses with better performance. MonetDB.R is also an Open-Source project, and we welcome your contributions. The connector provides a general-purpose DBI driver for MonetDB. Also, this package is required by the dplyr support for MonetDB.


You will need to download and install MonetDB and the MonetDB.R connector package. Install a stable version of MonetDB.R from CRAN by typing in an R session:


Data Loading

Your data will have to be imported into MonetDB first. You might find the function helpful.

Usage Example

conn <- dbConnect(dbDriver("MonetDB"), "monetdb://localhost/demo")
# write some test data
dbWriteTable(conn, "iris", iris)
# read data by SQL query
ds1 <- dbGetQuery(conn,"SELECT avg(sepal_width) FROM iris")


After installation, you may access the built-in documentation by typing the following commands in an R session:


There is also a Web version of the documentation for MonetDB.R. The monet.frame virtual data object has been moved to a separate package and is hosted on GitHub. For even more information, consider our scientific paper on MonetDB.R.


MonetDB.R is developed within the Database Architectures Group at CWI in Amsterdam by Hannes Mühleisen with contributions from Thomas Lumley and Anthony Damico.


If you have any questions, please do so on StackOverflow using both the monetdb and r tags. You may also view the archive of previously-asked questions. Please direct general MonetDB questions to the MonetDB mailing lists.