p2excel_pre | R Documentation |
The function saves the dataframe as a tab and prepares it for output into an excel sheet with a predetermined format.
p2excel_pre(tabname = "Default", datastable, tablename = "Default", filename)
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 |
a spreadsheet containing all of the exported tables
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.