Constructor for ImmuneSpaceConnection
class.
CreateConnection(
study = NULL,
login = NULL,
password = NULL,
verbose = FALSE,
onTest = FALSE
)
A "character"
vector naming the study.
A "character"
. Optional argument. If there is no netrc
file a temporary one can be written by passing login and password of an
active ImmuneSpace account.
A "character"
. Optional. The password for the selected
login.
A "logical"
whether to print the extra details for
troubleshooting.
A "logical"
whether to connect to the test server
(https://datatools-dev.immunespace.org/) instead of the production server
(https://datatools.immunespace.org/).
an instance of an ImmuneSpaceConnection
Instantiates an ImmuneSpaceConnection
for study
The constructor will try to take the values of the various `labkey.*`
parameters from the global environment. If they don't exist, it will use
default values. These are assigned to `options`, which are then used by the
ImmuneSpaceConnection
class.
if (FALSE) {
# Single study
con <- CreateConnection("SDY269")
# Cross study
con <- CreateConnection("")
}
sdy <- try(CreateConnection("SDY269"))
#> Error in .check_credential(labkey.url.base, verbose) :
#> Invalid credential or deactivated account. Check your account in the portal.
if (inherits(sdy, "try-error")) {
warning("Read the Introduction vignette for more information on how to set
up a .netrc file.")
}
#> Warning: Read the Introduction vignette for more information on how to set
#> up a .netrc file.