Fixed a bug when only model was supplied to apm_pre().
apm_pre()
Updated documentation and vignettes.