Description Usage Arguments Value Author(s) Examples
A function to set classes (e.g. as numeric or factor) to the variables in the dataframe.
1 | phenoDataFrame(PhenoData, variableClass)
|
PhenoData |
is the dataframe of phenotypic information extracted from an |
variableClass |
a character vector of length equal to the number of columns of the dataframe of phenotypic information, giving classes of the variables studied. |
A dataframe of class-corrected phenotypic variables.
Stephen Nyangoma
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data(liverdata)
data(liver_pheno)
OBJECT=new("aclinicalProteomicsData")
OBJECT@rawSELDIdata=as.matrix(liverdata)
OBJECT@covariates=c("tumor" , "sex")
OBJECT@phenotypicData=as.matrix(liver_pheno)
OBJECT@variableClass=c('numeric','factor','factor')
OBJECT@no.peaks=53
Data=OBJECT
variableClass =Data@variableClass
variables = c("SampleTag","tumor","sex")
PhenoInfo <- data.frame(Data@phenotypicData)
PhenoData <- data.frame(Data@phenotypicData)
pData=phenoDataFrame(PhenoData, variableClass)
class(pData$sex)
class(pData$SampleTag)
class(pData$tumor)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.