R package for mmpp