connect: Connect with RethinkDB
Description
This function reads config file (if exists) or from `host` and `port`
from parameters. Next, it opens a connection and creates database `db_name`
(only if already does not exists).
Usage
connect(host = "localhost", port = "28015", db_name = DEFAULT_DB,
config_file = DEFAULT_CONFIG_NAME)
Arguments
host
character with host address (default `localhost`)
port
character with port number (default `28015`)
db_name
character with databse name (default `DEFAULT_DB`)
config_file
character with rethink configuration file name
(default `DEFAULT_CONFIG_NAME`)
Value
connection structure
Examples
Run this code# NOT RUN {
cn <- connect()
# }
Run the code above in your browser using DataLab