Is there a way to name the column of a tibble using a variable? I want to name the first column below Clade for example. I tried paste() and assign(), but neither function seems to do what I want.
CLADE_FIELD = "Clade"
LINEAGE_FIELD = "Lineage"
metaDF = tibble(CLADE_FIELD = c("G"),
LINEAGE_FIELD = c("B.666"),
"Submission date" = c("2020-03"))
I am using this code in a unit test which is why I am creating this tibble artificially. The name references a column name in a csv and I want the code to be easily maintainable if this column name changes.