SPA3G: R package for the method of Li and Cui (2012)