| DataSpaceStudy | R Documentation |
The DataSpaceStudy class
The DataSpaceStudy class
DataSpaceConnection$getStudy()
DataSpaceConnection$getGroup()
studyA character. The study name.
configA list. Stores configuration of the connection object such as URL, path and username.
availableDatasetsA data.table. The table of datasets available in
the DataSpaceStudy object.
cacheA list. Stores the data to avoid downloading the same tables multiple times.
dataDirA character. Default directory for storing nonstandard
datasets. Set with setDataDir(dataDir).
treatmentArmA data.table. The table of treatment arm information for the connected study. Not available for all study connection.
groupA character. The group name.
studyInfoA list. Stores the information about the study.
new()Initialize DataSpaceStudy class.
See DataSpaceConnection.
DataSpaceStudy$new(study = NULL, config = NULL, group = NULL, studyInfo = NULL)
studyA character. Name of the study to retrieve.
configA list. Stores configuration of the connection object such as URL, path and username.
groupAn integer. ID of the group to retrieve.
studyInfoA list. Stores the information about the study.
print()Print DataSpaceStudy class.
DataSpaceStudy$print()
getDataset()Get a dataset from the connection.
DataSpaceStudy$getDataset( datasetName, mergeExtra = FALSE, colFilter = NULL, reload = FALSE, outputDir = NULL, ... )
datasetNameA character. Name of the dataset to retrieve.
Accepts the value in either the "name" or "label" field from availableDatasets.
mergeExtraA logical. If set to TRUE, merge extra information. Ignored for non-integrated datasets.
colFilterA matrix. A filter as returned by Rlabkey's
makeFilter.
reloadA logical. If set to TRUE, download the dataset, whether a cached version exist or not.
outputDirA character. Optional, specifies directory to download
nonstandard datasets. If NULL, data will be downloaded to
dataDir, set with setDataDir(dataDir). If dataDir
is not set, and outputDir is NULL, a tmp directory will be
used.
...Extra arguments to be passed to
labkey.selectRows
clearCache()Clear cache. Remove downloaded datasets.
DataSpaceStudy$clearCache()
getDatasetDescription()Get variable information.
DataSpaceStudy$getDatasetDescription(datasetName, outputDir = NULL)
datasetNameA character. Name of the dataset to retrieve.
Accepts the value in either the "name" or "label" field from availableDatasets.
outputDirA character. Directory path.
setDataDir()Set default directory to download non-integrated datasets. If no
dataDir is set, a tmp directory will be used.
DataSpaceStudy$setDataDir(dataDir)
dataDirA character. Directory path.
refresh()Refresh the study object to update available datasets and treatment info.
DataSpaceStudy$refresh()
clone()The objects of this class are cloneable with this method.
DataSpaceStudy$clone(deep = FALSE)
deepWhether to make a deep clone.
connectDS DataSpaceConnection
## 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()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.