Internal Conversion of Data to Function
to_function(x, bounds, interp_opts)a function
a function or the single argument version of x in
xy.coords() (as per approxfun() or splinefun() inputs). Pass through
from user input, must be checked
numeric vector, length 2: the partition lower bound; not checked,
result of range(make_partition(...)).
if x is function, ignored. Otherwise,
an interpolating function and its arguments.