0

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?

Yvonne
  • 21
  • 3
  • 1
    In order to get some help, please provide an example of the data. You can for example use the dput() function and post the structure of your data. Please look at the part "Providing a minimal dataset/ Copying original data" in [this post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Camillionnaire Nov 29 '22 at 08:58

0 Answers0