rockr.connect: Rocker connection

Description Usage Arguments Value See Also Examples

View source: R/connection.R

Description

Connect with Rocker.

Usage

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## 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)

rockr documentation built on March 12, 2021, 5:06 p.m.