isobarcvfNB <- function(nbOutput){
isobarMat <- matrix()
isobarMat <- lapply(seq_along(nbOutput), function(x) isobarMat)
## Loop over folds
for(i in seq_along(nbOutput)){
## Find all isobaric lipids within each run and aggregate with a nested
## two-way table
for(j in 1:length(nbOutput[[i]][[1]][, unique(run)])){
tempDT <- nbOutput[[i]][[1]][run == unique(run)[j]]
addRow <- t(as.matrix(table(table(tempDT[, Barcode]))))
if(j == 1){
isobarMat[[i]] <- addRow
} else{
isobarMat[[i]] <- rbind.fill.matrix(isobarMat[[i]], addRow)
}
}
isobarMat[[i]] <- colSums(isobarMat[[i]])
}
return(isobarMat)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.