Changing values in a data frame with respect to corresponding data frame by setting a cutoff value

D1 * (D2 >= 3)
  x y z
1 0 0 1
2 0 0 0
3 3 3 3
4 4 4 0
5 5 5 5