I am trying to create some column names with paste. I think this is quite simple, however I am not knowing a function that could I use for my purposes
Assume I've the following matrix:
X <- matrix(rnorm(100,1,1), ncol=10)
colnames(X)=NULL
The expected output should be:
colnames(X) <- c("l1.1", "l2.1", "l3.1", "l4.1", "l5.1", "l1.2", "l2.2", "l3.2", "l4.2", "l5.2")
But in a very general way to assign this structure for high dimensional purposes. In particular I've 5 variables (first number) and the 2nd number is assigning the lag number of the variable