I want to know how to make a loop in R. I show a very simple example of a code below,
Test_A <- Test %>% mutate (A = 1)
Test_B <- Test %>% mutate (B = 1)
Test_C <- Test %>% mutate (C = 1)
Test_D <- Test %>% mutate (D = 1)
I want to make a loop for this code and make it more simple because this code is too repetitive. Do anyone have suggestion for me?