| add_star_column | R Documentation |
Adds stars next to a column based on p-values
add_star_column(
data,
...,
p = "p",
merge = FALSE,
superscript = TRUE,
star = "\\*",
alpha = c(0.05, 0.01, 0.001),
first_alpha_marginal = FALSE,
add_trailing_space = FALSE,
prefix = "\\"
)
data |
data.frame or tibble |
... |
Column name or tidyselect function. Select columns |
p |
Column name or tidyselect function. Select p-value column name |
merge |
merge and balance columns (default: |
superscript |
make as superscript |
star |
text for making stars |
alpha |
vector of thresholds |
first_alpha_marginal |
if TRUE, the first alpha value is treated as marginal and gets a dagger instead of a star |
add_trailing_space |
if TRUE, adds a trailing space after the stars (default: FALSE) |
prefix |
usually backslashes to prevent markdown from interpreting asterisks as bullets or italics |
data.frame
data.frame(b = c(1.4,2.2),
p = c(.54, .02)) |>
add_star_column(b, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.