Skip to contents

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.

Usage

write_input_tribble(names)

Arguments

names

Character vector of column names.

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)"