How do loop variable name in mutate

How can I loop the variable name in the mutate command in R?
I am copying only a certain part of the code where I am having a problem.

  data.frame%>% 
  mutate(paste("Soiltemp_slc", j, sep = "") = accumulate2(c(first(dummy1), dummy1[-1]), dummy2[-1], ~ ..2+(..1*..3))) %>% 
  {. ->> data.frame }  


Can you provide more details about the structure of data.frame and what exactly you are trying to achieve? You will get much better help on this forum if you can provide a reproducible example or reprex.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.