I try to create a set of values with a for loop using paste0 but get an error:
for(i in 1:3){
paste0('value_',i) <- paste0('test',i)
}
Fehler in paste0("value_", i) <- i :
Ziel der Zuweisung expandiert zu keinem Sprachobjekt
I want it like this but with a for loop:
value_1 <- paste0('test',1)
value_2 <- paste0('test',2)
value_3 <- paste0('test',3)
> value_1
[1] "test1"
> value_2
[1] "test2"
> value_3
[1] "test3"
How can I solve that?
question from:https://stackoverflow.com/questions/66050214/how-can-i-set-a-value-using-paste0