Imagine I have the following function which has a lot of arguments but for the sake of simplicity I only list two here:
library(glue)
glue("{a} + {b} is equal to 3", a = 1, b = 2)
Now I have a data.table with all the arguments/values that I want to pass to my glue function:
data.table:
library(data.table)
DT <- data.table(varnames = c("a", "b"), values = c(1, 2))
How could I directly pass the arguments/values from my DT onto my glue function?