powered by
Takes a prefix (e.g., "Q") and the number of items you want (e.g., 3), and returns a vector of item names (e.g., c("Q1", "Q2", "Q3")).
makeItemNames(prefix, nitems)
A character vector of sequentially numbered item names.
A quoted prefix that will precede the number in the item name (e.g., the "Q" in "Q1").
The number of items
makeItemNames("q", 3) itemNames <- makeItemNames("item", 7) itemNames
Run the code above in your browser using DataLab