NA
if the lie too far from a reference set of valuesSet rows of data to NA
if the lie too far from a reference set of values
too_far_to_na(smooth, input, reference, cols, dist = NULL)
an mgcv smooth object
data frame containing the input observations and the columns to
be set to NA
data frame containing the reference values
character vector of columns whose elements will be set to NA
if
the data lies too far from the reference set
numeric, the distance from the reference set beyond which
elements of input
will be set to NA