R package for k harmonic means