> p = data.frame(high=c(5,2), settle=c(3,4)) > p high settle 1 5 3 2 2 4 What is the most abbreviated way to apply: if (p$high < p$settle) p$high = p$settle I want to modify p to become: > p high settle 1 5 3 2 4 4