Try this:
Define a function
vec <- function(x) {
v <- 1:x
}
Generate a list of vectors
the_list <- lapply(End.Num, FUN = vec)
Split the_list
in n variables
list2env(setNames(the_list,paste0("v",seq_along(the_list))), envir = parent.frame())
I advise you to stop at point 2 and to access the elements of the list via the_list[[i]]
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…