R/proteomicspData.Generic.R

setGeneric("proteomicspData",

function (Data, ...) 
{    
varclass <- Data@variableClass
    PhenoInfo <- data.frame(Data@phenotypicData)
       no.variables <- length(varclass)
         for(i in 1:no.variables) {
            if(varclass[i] == "numeric") {
         PhenoInfo[,i]= as.numeric(as.vector(PhenoInfo[,i]))
} 

else

  if(varclass[i] == "character") {
    PhenoInfo[,i] <- as.character(as.vector(PhenoInfo[,i]))
 }

else

  if(varclass[i] == "factor") {
    PhenoInfo[,i] <- PhenoInfo[,i]
}

PhenoInfo <- PhenoInfo
}

PhenoInfo

standardGeneric("proteomicspData")
}

)

Try the clippda package in your browser

Any scripts or data that you put into this service are public.

clippda documentation built on Nov. 8, 2020, 8:13 p.m.