Metal–insulator transition of R2−xCaxRu2O7 (R=Y, Sm)