inst/count_totals.R

library(Biobase)
efiles <- dir(pattern="^.*_esets\\.rda$")

res <- sapply(rev(efiles), function(efile){
    print(efile)
    load(efile)
    output <- c(length(esets), sum(sapply(esets, ncol)))
    names(output) <- c("n.datasets", "n.samples")
    output
})

write.csv(t(res), file="database_totalpatients.csv")
lwaldron/doppelgangR documentation built on Nov. 2, 2024, 9:28 a.m.