Change variable name in for loop using R June 11, 2022 by Tarik d <- 5 for(i in 1:10) { nam <- paste("A", i, sep = "") assign(nam, rnorm(3)+d) } More info here or even here!