defaultConnection | R Documentation |
These functions return the default connection/authentication objects from the package environment. If no default connection/authentication has been established yet, will return NULL. In the case of authentication, if using a desktop/workstation session, NULL will work fine. If using SAPI/Bpipe, you may need to use blpAuthenticate() to create an authentication object.
defaultConnection()
defaultAuthentication()
Required arguments can be set via options
. See
blpConnect
and blpAuthenticate
for details.
In addition, if options blpAutoConnect
and/or
blpAutoAuthenticate
are set to ‘TRUE’, a connection and/or
authentication is established in the .onAttach()
function and
stored in the package environment. This effectively frees users from
having to explicitly create such objects. Of course, the user can also
call blpConnect
and/or blpAuthenticate
explicitly and
store the connection/authentication objects. These helper functions
look up the stored connection/authentications object and return them.
In case no connection has been established, an error message is shown.
In case no authentication has been established, NULL is returned.
(NULL is sufficent for Desktop API connections.)
Whit Armstrong and Dirk Eddelbuettel
## Not run:
con <- defaultConnection()
blpid <- defaultAuthentication()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.