I create a list and I want to name the elements of the list. Could somebody help me on this?
LL <- vector(mode = "list")
L11 <- seq(1, 10)
L12 <- seq(11, 20)
LL[[length(LL)+1]] <- cbind(L11, L12)
# I want to name LL[[1]] as "L1", but this does not work
names(LL[[length(LL)]]) <- c("L1")
L21 <- seq(21, 30)
L22 <- seq(31, 40)
LL[[length(LL)+1]] <- cbind(L21, L22)
# I want to name LL[[2]] as "L2", but this does not work
names(LL[[length(LL)]]) <- c("L2")
LL