I am trying to implement this in R using map_if, to make sure that mean(x) must be less than mean(y) by swapping the values of x and <
mean(x)
mean(y)
x