Any time R tells you that a function can't be found (and the function is provided by a particular package), it's because you haven't loaded the requisite package. In this case it's the momr package that you have neglected to load.
Also, please note that this support site is meant to provide support for Bioconductor packages, and neither the stats package nor momr are Bioconductor packages. You could ask about those packages on R-help (r-help@r-project.org), or maybe stackoverflow.com.