rockr.connect {rockr}R Documentation

Rocker connection

Description

Connect with Rocker.

Usage

rockr.connect(
  username = getOption("rock.username"),
  password = getOption("rock.password"),
  url = getOption("rock.url"),
  opts = getOption("rock.opts", list())
)

Arguments

username

User name in Rocker R server. Can be provided by "rock.username" option.

password

User password in Rocker R server. Can be provided by "rock.password" option.

url

Rocker R server url. Can be provided by "rock.url" option.

opts

Curl options as described by httr (call httr::httr_options() for details). Can be provided by "rock.opts" option.

Value

A rockr connection object.

See Also

Other connection functions: rockr.close(), rockr.open()

Examples

## Not run: 
#### The below examples illustrate the different ways to connect to rockr ####

# explicit username/password connection
conn <- rockr.connect(username='administrator', password='password',
                    url='https://rocker-demo.obiba.org')

# explicit access token connection
conn <- rockr.connect(token='HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
                    url='https://rocker-demo.obiba.org')

# connect using options and user credentials
options(rockr.username='administrator',
 rockr.password='password',
 rockr.url='https://rocker-demo.obiba.org')
conn <- rockr.connect()

# connect using options and personal access token
options(rockr.token='HYG16LO0VaX4O0UardNbiqmr2ByBpRke',
 rockr.url='https://rocker-demo.obiba.org')
conn <- rockr.connect()

# connect using ssl key pair
options(rockr.opts=list(
   sslcert='my-publickey.pem',
   sslkey='my-privatekey.pem'))
conn <- rockr.connect(url='https://rocker-demo.obiba.org')

## End(Not run)

[Package rockr version 1.0.0 Index]