I have a vector
Names<-c("A", "B", "C")
And I would ultimately like something like this
c("A_Mean", "A_Median", "A_InGroupVar", "B_Mean", "B_Median", "B_InGroupVar", "C_Mean", "C_Median", "C_InGroupVar")
I have tried the paste function
c(paste(Names, "_Mean"), paste(Names, "_Median"), paste(Names, "_InGroupvar"))
But I need the vector to be ordered by Name. I know I could easily do this in a loop but I am looking for a more elegant solution.