0

So I'm trying to get daily temperature changes from a smoothed line graph I created using future expected seasonal increases.

So I have 4 data points, and I'm trying to get 365 values from it.

How would I got about doing that?

(I used geom_smooth(method = loess) to do the line graph, I did get warnings about my small data set but I assumed it was okay).

The only thing I could think of is pulling one data point at a time in the console, but there must be a more efficient way to go about this.

  • This is possible using `ggplot_build()`, but could we have a [mcve] please? – Ben Bolker Feb 22 '23 at 15:00
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. If you actually want the points, it's better not to use ggplot to calculate the line. Just use `loess` or whatever smoothing strategy you want and then you can predict from your model. – MrFlick Feb 22 '23 at 15:37
  • 1
    @BenBolker actually it is even easier now, with `layer_data` :) – tjebo Feb 22 '23 at 16:02

0 Answers0