I want to assign variables a new value using a loop. Say I have N variables v1 through vN. They have some value stored already. I want to update the stored values by passing them to a function and store in the same variable. Something like:
v1 <- "value1"
v2 <- "value2"
.
.
.
vN <- "valueN"
v_vector <- c(v1,v2,v3,...,vN)
dummy_function <- function(x){paste("new",x)}
for (v in v_vector){
v <- dummy_function(v)
}
This should update the value of v1 to new value1, for example. How can I achieve this in R?