Reputation: 75
everyone
I brought some new trivial questions to ask. I've searched, but I failed to look for the most efficient answer.
The string(or list) I would like to make looks like:
c("who","expr1","who","expr2",...,"who","expr100")
How can I efficiently make this string using loop(or another function) in R?
Thank you~!!
Upvotes: 2
Views: 1168
Reputation: 73265
At least this is one choice:
c(rbind("who", paste0("expr", 1:100)))
Upvotes: 3