connectToTransmart: Initializes a new connection to the tranSMART database via...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/RClientConnectionManager.R

Description

This function initializes the necessary connection settings to access the tranSMART database.

Usage

1
connectToTransmart(transmartDomain, use.authentication = TRUE, token = NULL, apiPrefix = NULL, ...)

Arguments

transmartDomain

a character string naming the domain of the tranSMART server to connect to.

use.authentication

logical indicating whether or not to use OAuth authentication. Must be TRUE (default setting) if the tranSMART server requires OAuth authentication

token

A token that can be used to authenticate to Transmart. This is the "refresh token" in OAuth terminology. To get such a token, use getTransmartToken after authenticating interactively for the first time.

apiPrefix

Prefix for API calls on the tranSMART server. E.g., '/v1' for instances that serve the API endpoints under '/v1' ('/v1/studies' for instance). If not provided, the R client will try to discover based on (the existence of) the '/versions/v1' endpoint.

...

additional arguments to be passed on to authenticateWithTransmart

Details

This function initialises the connection settings to a tranSMART server. It will set up the connection settings inside the transmartClientEnv environment (if non-existent, this environment is created), which will enable this R client to access the tranSMART database through the available get methods (eg. getStudies).

If use.authentication is not disabled, it will also guide the user through the authentication process.

The token parameter can be used to connect to Transmart in non-interactive contexts. To do so, you must configure Transmart to use non-expiring refresh tokens and to re-use the same refresh token. For the first, set grails.plugin.springsecurity.oauthProvider.tokenService.refreshTokenValiditySeconds = null (and maybe remove ~transmart/.grails/oauth2db.h2.db). For the second, set grails.plugin.springsecurity.oauthProvider.tokenServices.reuseRefreshToken = true.

Author(s)

Tim Dorscheidt, Jan Kanis, Rianne Jansen. Contact: [email protected]

See Also

getStudies, connectToTransmart, getTransmartToken.

For more information about the transmart RClient package and what it can be used for: transmartRClient-package

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  
  # Set the function's \code{transmartDomain} argument to the location of the tranSMART database: 
  localTransmartDomain <- "http://some.transmart.server/transmart"
  connectToTransmart(localTransmartDomain)
  
  # Follow the instructions for authentication.
  
## End(Not run)

transmart/RInterface documentation built on Oct. 18, 2017, 2:11 a.m.