For example, I have 9 conditions lets say and i want to store the seed number within a loop that goes into the results list that contains con1-con9. In my actual code the seed number will be changing, but just have this here for simplicity.
seed <- 500
for(x in 1:length(results)){
results$con1$seednum <- seed
}
I thought something like this, but does not seem to work.
eval(parse(text= paste0("results$con", x)))$seednum <- 500
How can i have this such that the con1 will change to con2, con3...etc through the for loop and be able to store that seed value in each results$con1 through results$con9? I assume it has something to do with eval and parse while using the x index, but I am not sure how it can be done.
Thank you.
eval.