Structural and magnetic properties of RCo12-xTix (R = Y and Sm) and YFe12-xTix compounds