Competition of superconductivity and antiferromagnetism in RNi2B2C (R = Tm, Dy, Ho, Er)