The DataSpaceStudy class

DataSpaceStudy

Value

an instance of DataSpaceStudy

Constructor

DataSpaceConnection$getStudy() DataSpaceConnection$getGroup()

Fields

study

A character. The study name.

config

A list. Stores configuration of the connection object such as URL, path and username.

availableDatasets

A data.table. The table of datasets available in the study object.

cache

A list. Stores the data to avoid downloading the same tables multiple times.

treatmentArm

A data.table. The table of treatment arm information for the connected study. Not available for all study connection.

group

A character. The group name.

studyInfo

A list. Stores the information about the study.

Methods

initialize(study = NULL, config = NULL, group = NULL, studyInfo = NULL)

Initialize DataSpaceStudy class. See DataSpaceConnection.

print()

Print DataSpaceStudy class.

getDataset(datasetName, colFilter = NULL, reload = FALSE, ...)

Get a dataset from the connection. datasetName: A character. Name of the dataset to retrieve. mergeExtra: A logical. If set to TRUE, merge extra information. colFilter: A matrix. A filter as returned by Rlabkey's makeFilter. reload: A logical. If set to TRUE, download the dataset, whether a cached version exist or not. ...: Extra arguments to be passed to labkey.selectRows

clearCache()

Clear cache. Remove downloaded datasets.

getDatasetDescription(datasetName)

Get variable information. datasetName: A character. Name of the dataset to retrieve.

refresh()

Refresh the study object to update available datasets and treatment info.

See also

Examples

# NOT RUN {
# Create a connection (Initiate a DataSpaceConnection object)
con <- connectDS()

# Connect to cvd408 (Initiate a DataSpaceStudy object)
# https://dataspace.cavd.org/cds/CAVD/app.view#learn/learn/Study/cvd408?q=408
cvd408 <- con$getStudy("cvd408")
cvd408

# Retrieve Neutralizing antibody dataset (NAb) for cvd408 from DataSpace
NAb <- cvd408$getDataset("NAb")

# Get variable information of the NAb dataset
cvd408$getDatasetDescription("NAb")

# Take a look at cvd408's treatment arm information
cvd408$treatmentArm

# Clear cache of a study object
cvd408$clearCache()

# Connect to the NYVAC durability comparison group
# https://dataspace.cavd.org/cds/CAVD/app.view#group/groupsummary/220
nyvac <- con$getGroup(220)

# Connect to all studies
cvd <- con$getStudy("")

# Refresh the study object to update available datasets and treatment info
cvd$refresh()
# }