p2excel_pre {survout} | R Documentation |
Prepare to Export the Dataframe to An Excel Sheet.
Description
The function saves the dataframe as a tab and prepares it for output into an excel sheet with a predetermined format.
Usage
p2excel_pre(tabname = "Default", datastable, tablename = "Default", filename)
Arguments
tabname |
a string with the tab's name. |
datastable |
the dataframe that will be exported to Excel. |
tablename |
a string containing the table label and title, which will appear as the first row |
filename |
the name of the spreadsheet |
Value
a spreadsheet containing all of the exported tables
Examples
Dat <- survival::lung
results <- surv_uni_cat(Dat, "time", "status", "sex", report_index = TRUE)
wb <- openxlsx::createWorkbook()
wb <- p2excel_pre("survival_results",results,"Table 1. Overall Survival anlaysis",wb)
## Not run:
## saveWorkbook(wb, file = "os.xlsx", overwrite = TRUE)
## End(Not run)
[Package survout version 0.1.0 Index]