Common effect of chemical and external pressures on the magnetic properties of R CoPO (R= La, Pr, Nd, Sm)