Neutron diffraction has been used to study the effects of oxygen on the magnetic order of the rare-earth ions in RBa2Cu3O6+x (R=Dy, Er, Nd). For fully oxygenated superconducting (Tc=92 K) ErBa2Cu3O7, two-dimensional (2D) short-range magnetic correlations are observed just above the ordering temperature TN=0.62 K, while at TN long-range correlations develop in the a-b plane, inducing 3D long-range order. Below TN the sublattice magnetization is found to obey Onsager's exact solution of the 2D S=1/2 Ising model. For oxygen-reduced (x0.6) superconducting ErBa2Cu3O6.6 the 3D ordering temperature is lowered to TN0.48 K. For insulating ErBa2Cu3O6+x (x0) neither 2D nor 3D long-range order develops, as only 2D short-range correlations are observed. For DyBa2Cu3O7 (Tc92 K) 3D long-range order occurs at TN0.93 K, with spins coupled antiferromagnetically along all three crystallographic axes. As we reduce the oxygen concentration the 3D magnetic ordering temperature decreases. In addition, for a concentration 0.54≤xc<1, still in the superconducting phase, the spin configuration changes along the c-axis to ferromagnetic. In the insulating phase, x0.4, we observe both 2D and 3D diffuse scattering developing below 2 K, but 3D long-range order never occurs. In our highest oxygenated NdBa2Cu3O6.94 (Tc92 K), 3D long-range order develops below TN0.53 K. For a small reduction of oxygen to x=0.78, we observe drastic effects on the Nd order as only short-range 2D correlations are found at low temperatures. At nonsuperconducting x=0.45, 3D correlations develop at low temperatures, yet long-range order still does not occur. For x=0.3, 3D long-range order is reestablished, developing below TN1.5 K, three times that of the fully oxygenated material. Though the oxygen dependence of the rare-earth magnetism varies between the three compounds we have studied, our results indicate there is significant coupling between the chain layer oxygen and the rare-earth ions in each case. © 1995 The American Physical Society.