| column_format | R Documentation |
This class is used to define the format of columns in tables, including the name, header, latex representation, and a formatter function.
column_format(
name = character(0),
header = character(0),
latex = character(0),
formatter = function() NULL
)
name |
name of column |
header |
markdown representation of header name |
latex |
latex representation of header name |
formatter |
function that formats the column values. It should take a vector of values and return a character vector of formatted values. |
column_format object
R2 <- column_format(
"R2",
header = "*R*^2^",
latex = "$R^2$",
formatter = \(x, accuracy = the$accuracy, ...) {
align_chr(x,
accuracy = accuracy,
trim_leading_zeros = TRUE,
...)
})
R2
R2@header
R2@formatter
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.