An R package for the MNS algorithm