Magnetic properties of R2Fe14C (R=Dy or Er)