Superconducting and magnetic properties of RBa2Cu3O7−x compounds