# NOT RUN {
library(CHNOSZ)
pdat_CRC()
pdat_CRC("JKMF10") # same result as get_pdat("JKMF10")
# }
# NOT RUN {
# how the extdata/summary/summary_*.csv files were made
for(what in c("CRC", "pancreatic", "hypoxia", "osmotic")) {
pdat_fun <- paste0("pdat_", what)
datasets <- get(pdat_fun)()
comptab <- lapply_canprot(datasets, function(dataset) {
pdat <- get_pdat(dataset, pdat_fun)
get_comptab(pdat)
}, varlist = "pdat_fun")
# write summary table
comptab <- do.call(rbind, comptab)
comptab <- cbind(set = c(letters, LETTERS)[1:nrow(comptab)], comptab)
comptab[, 6:15] <- signif(comptab[, 6:15], 4)
filename <- paste0("summary_", what, ".csv")
write.csv(comptab, filename, row.names = FALSE, quote = 3)
}
# }
Run the code above in your browser using DataLab