Sets 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)

Arguments

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

Value

connection object

Details

If the brapi_db parameter is used it will override the other parameters; except user, password and session.

See also

Examples

if (interactive()) { library(brapi) # Need to connect to a database with genetic data # con <- ba_db()$xxxxx # ba_connect(con = con, ...) }