# NOT RUN {
swap_treatment.optim(current_treatment = c(0, 2, 0, 1, 1, 0, 2, 1, 1, 0),
change = 2)
swap_treatment.optim(current_treatment = c(0, 2, 0, 1, 1, 0, 2, 1, 1, 0),
change = 2,
prev_index_list = c(1, 2, 3, 4))
# }
Run the code above in your browser using DataCamp Workspace