saveXLS: saveXLS

Description Usage Arguments Value Examples

View source: R/Utils.R

Description

saveXLS

Usage

1
saveXLS(dat.lst, xls.fn, row.names = FALSE, ...)

Arguments

dat.lst

dataframe

xls.fn

filename

row.names

row names

...

misc

Value

new Excel file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
load(system.file("data", "allCall.lst.RData", package="BubbleTree"))

all.summary <- plyr::ldply(allCall.lst, function(.Object) {
    purity <- .Object@result$prev[1]
    adj <- .Object@result$ploidy.adj["adj"]
    # when purity is low the calculation result is not reliable
    ploidy <- (2*adj -2)/purity + 2  
    
    with(.Object@result,
         return(c(Purity=round(purity,3),
                  Prevalences=paste(round(prev,3), collapse=", "),
                  "Tumor ploidy"=round(ploidy,1))))
}) %>% plyr::rename(c(".id"="Sample"))

xls.filename <- paste("all_summary", "xlsx", sep=".")
saveXLS(list(Summary=all.summary), xls.filename)

BubbleTree documentation built on Nov. 8, 2020, 8:22 p.m.