featureTransform <- function(DT, logBool, zBool){
minimumCol <- grep("ExactMass", colnames(DT))
range <- (minimumCol+1):ncol(DT)
if(logBool == TRUE){
for (j in range){
set(DT, j = j, value = abs(DT[[j]]))
set(DT, j = j, value = log10(DT[[j]]))
}
}
if(zBool == TRUE){
DT[,(range) := lapply(.SD, scale), .SDcols = range]
for (j in range){
set(DT, j = j, value = scale(DT[[j]]))
}
}
return(DT)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.