Two magnetic transitions and metamagnetism in the R2BaCuO5 (R = Sm, Eu, Gd, Dy, Ho, Er, Tm, Yb) compounds