ba_connect.RdSets a global list variable 'brapi' that contains all parameters to connect to a BrAPI compliant online database.
ba_connect(brapiDb = NULL, secure = FALSE, protocol = "http://", db = "127.0.0.1", port = 2021, apipath = NULL, multicrop = FALSE, crop = "sweetpotato", user = "", password = "", token = "", granttype = "password", clientid = "rbrapi", bms = FALSE)
| brapiDb | brapiDb R object for brapi databases created by as.ba_db [default: NULL] |
|---|---|
| secure | logical TRUE/FALSE |
| protocol | string; default: http:// (else: https://) |
| db | string; default '127.0.0.1' (localhost) |
| port | integer; default: 80 |
| apipath | character; default NULL |
| multicrop | logical; default FALSE |
| crop | string; default: '' (empty) |
| user | string; default: '' (empty) |
| password | string; default: '' (empty) |
| token | string; default: '' (empty) |
| granttype | string |
| clientid | string: default: rbrapi |
| bms | logical; default: FALSE |
connection object
If the brapi_db parameter is used it will override the other parameters; except user, password and session.
Other brapiutils: as.ba_db,
ba_can_internet, ba_check,
ba_db, ba_login,
ba_logout, is.ba_con,
print.ba_con,
print.ba_db_list
if (interactive()) { library(brapi) # Need to connect to a database with genetic data # con <- ba_db()$xxxxx # ba_connect(con = con, ...) }