I am trying to re-order columns in R using a for loop since the column range needs to be dynamic. Does anyone know what is missing from my code?

```
    Group <- c("A","B","C","D")
    Attrib1 <- c("x","y","x","z")
    Attrib2 <- c("q","w","u","i")
    Day1A <- c(5,4,6,3)
    Day2A <- c(6,5,7,4)
    Day3A <- c(9,8,10,7)
    Day1B <- c(4,3,5,2)
    Day2B <- c(3,2,4,1)
    Day3B <- c(2,1,3,0)

    df <- data.frame(Group, Attrib1,Attrib2,Day1A,Day2A,Day3A,Day1B,Day2B,Day3B)

    day_count <- 3

    for(i in 4:ncol(df)) {
      if (i == day_count+3) break
      df[c(i,day_count+i)]
     }

```

Here is my desired result:

```
    df <- data.frame(Group, Attrib1,Attrib2,Day1A,Day1B,Day2A,Day2B,Day3A,Day3B)

```