Low-temperature (0.5-4 K) specific-heat measurements have been made on oxygen-deficient (0.5) nonsuperconducting RBa2Cu3O7- (R=Nd and Sm) compounds and compared to measurements previously performed on their high-critical- temperature Tc 92 K superconducting counterparts (0.1). We show that the specific-heat anomaly due to magnetic ordering of the Nd3+ and Sm3+ ions in the Tc 92 K superconducting RBa2Cu3O7- (R=Nd and Sm) compounds can be well described by a two-dimensional anisotropic antiferromagnetic Ising model with exchange-interaction parameters E1 and E2 in the a-b plane; the respective values of the Néel temperature TN and the ratio E1/E2 are 0.5 K and 50 for Nd and 0.61 K and 11 for Sm. The specific-heat anomaly of the oxygen-deficient nonsuperconducting NdBa2Cu3O7- compound is also associated with an antiferromagnetic transition according to low-temperature magnetization measurements, although the temperature dependence of the anomaly and the value of TN (1.7 K) are quite different from those in the superconducting state. Neutron-diffraction measurements on the Tc 92 K superconducting phase of NdBa2Cu3O7- reveal that the Nd3+ magnetic moments form a simple antiferromagnetic structure in which the nearest-neighbor moments in all three dimensions are aligned antiparallel to one another along the c axis. In the Tc 92 K superconducting phase, the ordered moment of the Nd3+ ions obtained from the neutron scattering data is z=(1.07 0.07)B. The low-temperature specific-heat anomaly of the oxygen-deficient nonsuperconducting SmBa2Cu3O7- compound can be formally described by a Schottky anomaly for two doublets split by the crystalline electric field or a one-dimensional Ising model.