write_to_xl {easysurv} | R Documentation |
Export easysurv output to Excel via openxlsx
Description
Export easysurv output to Excel via openxlsx
Usage
write_to_xl(wb, object)
Arguments
wb |
A Workbook object containing a worksheet |
object |
The output of an easysurv command |
Value
An Excel workbook with the easysurv output.
Examples
km_results <- get_km(
data = easysurv::easy_bc,
time = "recyrs",
event = "censrec",
group = "group",
risktable_symbols = FALSE
)
wb <- openxlsx::createWorkbook()
## Not run:
write_to_xl(wb, km_results)
openxlsx::saveWorkbook(wb, "km_results.xlsx", overwrite = TRUE)
openxlsx::openXL("km_results.xlsx")
## End(Not run)
[Package easysurv version 2.0.1 Index]