glue provides string interpolation similar to Python's F-strings, but returned values inherit the glue class. This seems to cause unexpected results in certain environments, e.g. base::cat().

gum(..., .envir = parent.frame())

Arguments

...

character, expressions to format.

.envir

environment in which to evaluate expressions.

Value

character

See also

Examples

library(salinasr) my_name <- "Brendan" my_lang <- "R" gum("My name is {my_name} and I am using {my_lang}.")
#> [1] "My name is Brendan and I am using R."