Description Usage Arguments Value Examples
The MonetDB server can be controlled from the R shell using the functions described below.
The general process is to generate a MonetDb database directory and startup script using
monetdb.server.setup
, then pass the path to the startup script to monetdb.server.start
.
This function will return the process id of the database server, which in turn can be passed to
monetdb.server.stop
to stop the database server again.
1 2 3 4 | monetdb.server.setup(database.directory,monetdb.program.path,
dbname = "demo", dbport = 50000)
monetdb.server.start(bat.file)
monetdb.server.stop(correct.pid)
|
database.directory |
Path to the directory where the initialization script and all data will be stored. Must be empty or non-existant. |
monetdb.program.path |
Path to the MonetDB installation |
dbname |
Database name to be created |
dbport |
TCP port for MonetDB to listen for connections. This port should not conflict with other running programs on your local computer. Two databases with the same port number cannot be accessed at the same time |
bat.file |
Path to the MonetDB startup script. This path is returned by |
correct.pid |
Process ID of the running MonetDB server. This number is returned by |
monetdb.server.setup
returns the path to a MonetDB startup script, which can used many times
monetdb.server.start
returns the process id of the MonetDB database server
1 2 3 4 5 6 7 | ## Not run:
startscript <- monetdb.server.setup("/tmp/database","/usr/local/monetdb/", "db1", 50001)
pid <- monetdb.server.start(startscript)
monetdb.server.stop(pid)
conn <- dbConnect(MonetDB.R(), "monetdb://localhost:50001/db1")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.