Effects of A-site ordering on the Mn local structure and polar phases of RBaMn2O6 (R=La,Nd,Sm,andY)