CreateConnection {ImmuneSpaceR} | R Documentation

## CreateConnection

### Description

Constructor for `ImmuneSpaceConnection` class

### Usage

    CreateConnection(study = NULL, login = NULL, password = NULL,
      use.data.frame = FALSE, verbose = FALSE, onTest = FALSE)

### Arguments

`study` | A `"character"` vector naming the study.
`login` | 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.
`password` | A `"character"`. Optional. The password for the selected login.
`use.data.frame` | A `"logical"`. If set to TRUE, the functions will return `data.frame` objects instead of `data.table`.
`verbose` | A `"logical"` whether to print the extra details for troubleshooting.
`onTest` | A `"logical"` whether to connect to the test server (https://test.immunespace.org/) instead of the production server (https://www.immunespace.org/).

### Details

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.

### Value

an instance of an `ImmuneSpaceConnection`

### See Also

ImmuneSpaceConnection

### Examples

    ## Not run:
      # Single study
      con <- CreateConnection("SDY269")
      # Cross study
      con <- CreateConnection("")

    ## End(Not run)

    sdy <- try(CreateConnection("SDY269"))
    if(inherits(sdy, "try-error")){
      print("Read the Introduction vignette for more information on how to set up
      a .netrc file.")
    }

[Package ImmuneSpaceR version 1.6.2 Index]