dsConnect: Create a connection to a DataSHIELD-aware data repository

Description Usage Arguments See Also Examples

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.

\Sexpr[results=rd,stage=render]{DSI:::methods_as_rd("dsConnect")}

Usage

1
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

1
2
3
4
5
6
7
8
## 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)

DSI documentation built on June 22, 2021, 5:06 p.m.