This question relates to this previously asked question about creating a sequential list of letters. I am currently trying to created a list of variables that is both numerically and alphabetically ascending. Essentially i want a list of something like this:
"var_1A" "var_1B" var_"1C" "var_1D" "var_2A" "var_2B" var_"2C" "var_2D"
I can easily create a list of variable ascending numerically
paste("var_", 1:2, "A", sep="")
or alphabetically
paste("var_1", letters[1:4], sep="")
but combining the two yields:
paste("var_", 1:2, letters[1:4], sep="")
[1] "var_1a" "var_2b" "var_1c" "var_2d"
How can I get the desired outcome above?