Description Usage Arguments Value Methods (by class) Examples
The method takes a list of variable accessions and returns a list of variable names. The output variable name can be shown in three different formats: name only ( e.g. LNUCSCORE ), name and accession separated by underscore (e.g. LNUCSCORE_phv00000006.v2), name and accession separated with space and parenthesis (e.g. LNUCSCORE (phv00000006.v2)). There is no validation applied to the input accessions.
1 2 3 4 5 6 | getVarNameByPhvAcc(object, phvAccList, ...)
## S4 method for signature 'Commons,character'
getVarNameByPhvAcc(object, phvAccList, ...,
colNameWithAcc = F, underscore = F, phsAcc,
studyDataDicDF = data.frame())
|
object |
Commons class object. |
phvAccList |
a character vector. The dbGaP phenotype variable accessions. |
... |
There are optional arguments. |
colNameWithAcc |
a logical value. (optional). If FALSE (default), outputs variable name only; If TRUE, outputs concatenated variable name and variable. |
underscore |
a logical value. (optional) Used only when colNameWithAcc is TRUE. If TRUE (default), underscore is used between variable name and accession( e.g. LNUCSCORE_phv00000006.v2 ); If FALSE, the parenthesis with a space is used between variable name and accession ( e.g. LNUCSCORE (phv00000006.v2) ). |
phsAcc |
a character string. (optional) The accession of the study where the variables belong. It is required if studyDataDicDF is not provided. |
studyDataDicDF |
a data frame. (optional) The data frame of the study data dictionary (variable meta-data). It is required if phsAcc is not provided. |
a named list of variable names. The variable names of the input variable accession.
object = Commons,phvAccList = character
:
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
c <- Commons()
accList = c('phv00000027.v2', 'phv00053747.v2')
phsAcc = 'phs000001.v3.p1'
getVarNameByPhvAcc(c, phvAccList=accList, phsAcc=phsAcc)
# or
getVarNameByPhvAcc(c, phvAccList=accList, phsAcc=phsAcc, colNameWithAcc=T)
# or
getVarNameByPhvAcc(c, phvAccList=accList, phsAcc=phsAcc, colNameWithAcc=T, underscore=T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.