2

I'm trying to start with the MonetDB.R package but I struggle to setup a connection (dbConnect). Here is a reproductible example

require(MonetDB.R)
drv <- dbDriver('MonetDB.R')
con <- dbConnect(drv, 'monetdb://localhost/demo')
## Process R aborted (core dumped) at Thu Dec 26 11:03:47 2013
## R: mapi.c:72: mapiConnect: Assertion `Rf_isInteger(port)' failed.

Is there any trick to fix this error ?

I'm using the developpement version of MonetDB (Database: MonetDB v11.18.0 (unreleased)) , the latest version of R (beta build, see sessionInfo below) and Arch Linux (64 bit, kernel 3.12.5-1)

## R version 3.0.2 Patched (2013-12-23 r64506)
## Platform: x86_64-unknown-linux-gnu (64-bit)

## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods  
## [7] base     

## other attached packages:
## [1] MonetDB.R_0.8.1 digest_0.6.4    DBI_0.2-7      

## loaded via a namespace (and not attached):
## [1] compiler_3.0.2 tools_3.0.2

Thanks

dickoa
  • 18,217
  • 3
  • 36
  • 50
  • hi, `MonetDBLite` (on CRAN) now replaces `MonetDB.R` and runs embedded (like `RSQLite`). for more detail, see https://github.com/hannesmuehleisen/MonetDBLite/blob/master/README.md – Anthony Damico Jun 18 '16 at 15:56
  • @AnthonyDamico Thanks, indeed it is way easier to use it. – dickoa Jun 20 '16 at 11:58

1 Answers1

2

The reported problems are known and fixed in version 0.8.3 (and above) of the connector, which is available from CRAN.

Best, Hannes (Maintainer of MonetDB.R)

Hannes Mühleisen
  • 2,542
  • 11
  • 13
  • Thank you very much it works now but when I try to upload some data `dbWriteTable(con, "iris", iris)` I have this error `:R: mapisplit.c:134: mapiSplit: Assertion cCol == cols - 1' failed Aborted (core dumped)` – dickoa Dec 26 '13 at 13:35
  • Edited my answer above, for some reason types on the R side have changed, which failed an assertion on the C part of the connector. – Hannes Mühleisen Dec 28 '13 at 10:26
  • I still have the same error with the 0.8.3 version. I wish I could be more helpful to fix this – dickoa Dec 28 '13 at 13:36
  • OK, installing ArchLinux and your exact version of R in VM now. – Hannes Mühleisen Dec 28 '13 at 14:16
  • Thank you very much. Just let me know if I can do something – dickoa Dec 28 '13 at 14:22
  • I have installed R-patched r64507 on Arch Linux 2013.12.01/64bit with MonetDB on the current development branch (2da4fc...) and MonetDB.R 0.8.3. Everything works fine. Please ensure you have the latest version of the package installed and loaded. Are there any other specific properties of your environment? – Hannes Mühleisen Dec 29 '13 at 11:42
  • The only specific proprerty I can recall is the use openblas. I tried to run R under gdb and valgrind without success (not enough information). I'll uninstall the dev branch and try to use release tarball. I'll let you know if it works. Thanks again for your valuable help. – dickoa Dec 29 '13 at 12:40
  • Because I really want to explore MonetDB I removed the line 134 in mapisplit.c (assert(cCol == cols -1 ) and so far no bug but I'm sure that it'll break something elsewhere. I'll try to understand what mapisplit.c is doing to see how I can get it to work with me with the assert line. thanks again – dickoa Dec 29 '13 at 13:20
  • I installed MonetDB.R on my Windows machine, but I keep getting the following error when I run dbConnect() `Error in .local(drv, ...) : Could not connect to localhost:5000` – vatodorov Dec 30 '13 at 14:12
  • @vatodorov, the port number should probably be 50000 (the default), not 5000. – Hannes Mühleisen Dec 30 '13 at 16:31