I am developing a shiny app in which I am plotting scatterplot and a spline fit function on it, the degree of spline function can be changed by a slider whose values varies