I have a question which is based on an earlier question. plotting smooth line through all data points The smooth line through datapoints is exactly what I want, and it works on my data. So, splines are what I need, I think.
But, my data is splitted in years, and I want that years together in one figure (for every year an separate line. My question is: how can I get the splines for multiple groups?
spline_int <- as.data.frame(spline(d$hour, d$impressions))
I think I have to add an extra part to the code, but I do not know how. Or do I have to make a separate spline_int for every year?