In newer versions of R (I have 3.6 and previously had 3.2), the stats::regularize.values function has been changed to have a default value of warn.collapsing as
I had this problem too, and fixed it by adding ties=min to the argument list of splinefun().
The value of missing(ties) is now passed as warn.collapsing to regularize.values().
https://svn.r-project.org/R/trunk/src/library/stats/R/splinefun.R
https://svn.r-project.org/R/trunk/src/library/stats/R/approx.R
Also see:
https://cran.r-project.org/doc/manuals/r-release/NEWS.html
and search for regularize.values().