dsConnect {DSI}R Documentation

Create a connection to a DataSHIELD-aware data repository

Description

Connect to a data repository going through the appropriate authentication procedure. Some implementations may allow you to have multiple connections open, so you may invoke this function repeatedly assigning its output to different objects. The authentication mechanism is left unspecified, so check the documentation of individual drivers for details.

Usage

dsConnect(drv, name, restore = NULL, ...)

Arguments

drv

an object that inherits from DSDriver-class.

name

Name of the connection, which must be unique among all the DataSHIELD connections.

restore

Workspace name to be restored in the newly created DataSHIELD R session.

...

authentication arguments needed by the data repository instance; these typically include 'username', 'password', 'token', 'host', 'port', 'dbname', etc. For details see the appropriate 'DSDriver'.

See Also

dsDisconnect to disconnect from a data repository.

Other DSDriver generics: DSDriver-class, dsGetInfo()

Examples

## Not run: 
con <- dsConnect(DSOpal::Opal(), "server1",
  username = "dsuser", password = "password", url = "https://opal-demo.obiba.org")
con
dsListTables(con)
dsDisconnect(con)

## End(Not run)

[Package DSI version 1.6.0 Index]