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.

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

if (FALSE) {
con <- dsConnect(DSOpal::Opal(), "server1",
  username = "dsuser", password = "password", url = "https://opal-demo.obiba.org")
con
dsListTables(con)
dsDisconnect(con)
}