Write a tribble template with placeholders for a character vector of column names
Source:R/p_table_helpers.R
write_input_tribble.Rd
Generates a character string representing an R tibble::tribble()
with the specified column names and 3 rows filled with placeholder
text "..."
. Column values are aligned under their headers for easy editing.
Value
Character string containing the R code for an input tribble with placeholders "..."
,
formatted for manual editing with aligned columns.
Examples
write_input_tribble(c("Unit", "Year", "Outcome", "Treatment"))
#> [1] "tibble::tribble(\n ~`Unit`, ~`Year`, ~`Outcome`, ~`Treatment`,\n \"...\" , \"...\" , \"...\" , \"...\" ,\n \"...\" , \"...\" , \"...\" , \"...\" ,\n \"...\" , \"...\" , \"...\" , \"...\" \n)"