This shows how you need to use ::
with all your functions that are not in base R.
sampleplot(x, y)
The x variables.
The y response values.
the coefficient of the linear regression
x <- 1:10
y <- 10+3*x + stats::rnorm(10, 0, 10)
sampleplot(x, y)
#> (Intercept) x
#> 12.969998 2.556096