I have a data that looks like this:
>data(growth)
Year Growth
<int> <dbl>
1 1952 0.947
2 1953 1.15
3 1954 1.09
4 1955 1.12
5 1956 0.869
6 1957 1.12
7 1958 1.22
8 1959 0.973
9 1960 0.901
10 1961 1.03
I want to create a time series and then map a 'trend smoothing spline' on the plot. I know the code for the spline is
p + stat_smooth(
color = "#FC4E07", fill = "#FC4E07",
method = "loess")
However, I don't know how can I extract that spline (without the background time series) from the plot, and then combine 4 splines into one graph?
Thanks a lot.