Format numeric cell style based on the class
of the columns. If it is numeric, numeric format is two decimal
places. If it is scientific, numeric format is scientific of the
form 0.00E+00.
Usage
format_num_cell_style(
curve_summary,
dilution_summary = lifecycle::deprecated(),
workbook,
sheet
)Arguments
- curve_summary
The summary table generated by function
summarise_curve_table()and/orevaluate_linearity()but it can also be any generic data frame or tibble.- dilution_summary
- workbook
A workbook object from
openxlsx.- sheet
The name of the sheet to apply the numeric style on
workbook.
Examples
r_corr <- c(
0.951956, 0.948683, 0.978057, 0.976462,
0.970618, 0.969348, 0.343838, 0.383552
)
pra_linear <- c(
65.78711, 64.58687, 90.21257, 89.95473,
72.91220, 72.36528, -233.05949, -172.13659
)
mandel_p_val <- c(
2.899006e-07, 7.922290e-07, 2.903365e-01, 3.082930e-01,
3.195779e-08, 6.366588e-08, 3.634004e-02, 1.864090e-02
)
concavity <- c(
-4133.501328, -4146.745747, -3.350942, -3.393617,
0.3942824, 0.4012963, -19.9469621, -22.6144875
)
curve_summary <- data.frame(
r_corr = r_corr, pra_linear = pra_linear,
mandel_p_val = mandel_p_val,
concavity = concavity
)
curve_summary <- mark_near_zero_columns(curve_summary)
# Create a new workbook
my_workbook <- openxlsx::createWorkbook()
# Create a new worksheet
openxlsx::addWorksheet(wb = my_workbook, sheetName = "Curve Summary")
format_num_cell_style(curve_summary,
workbook = my_workbook, sheet = "Curve Summary"
)