The new wildcard package ( CRAN, GitHub ) is a templating mechanism for data frames in R. Wildcards are placeholders for text, and you can evaluate them to generate new data frames from templates. I first conceived of the idea for the predecessor of drake, and I decided that the generative templating mechanism deserved to be a package of its own. Personally, I find it much more flexible and convenient than expand.grid().

The tutorial vignette on CRAN demonstrates the full functionality, and I have included a taste below.

library(wildcard)
myths <- data.frame(myth = c("Bigfoot", "UFO", "Loch Ness Monster"), 
                    claim = c("various", "day", "day"), 
                    note = c("various", "pictures", "reported day"))
wildcard(myths, wildcard = "day", values = c("today", "yesterday"))
##                myth     claim               note
## 1           Bigfoot   various            various
## 2               UFO     today           pictures
## 3               UFO yesterday           pictures
## 4 Loch Ness Monster     today     reported today
## 5 Loch Ness Monster yesterday reported yesterday
wildcard(myths, wildcard = "day", values = c("today", "yesterday"), expand = FALSE)
##                myth     claim           note
## 1           Bigfoot   various        various
## 2               UFO     today       pictures
## 3 Loch Ness Monster yesterday reported today