[R-sig-Geo] Adding a regression line on time series plot

Erin Hodgess er|nm@hodge@@ @end|ng |rom gm@||@com
Wed Jul 28 23:31:05 CEST 2021


How about something like this:

MODIS.filt.ts <- ts(rnorm(460),start=c(2001,1),end=c(2020,23),freq=23)
abline(lm(MODIS.filt.ts~c(1:460)))


Erin Hodgess, PhD
mailto: erinm.hodgess using gmail.com


On Wed, Jul 28, 2021 at 1:37 PM John Wasige <johnwasige using gmail.com> wrote:

> Dear all,
> Greetings!
>
> I need help. How can I add a regression line on this plot:
>
> MODIS.filt.ts = ts(l, start=c(2001,1), end=c(2020,23), frequency=23)
> plot(MODIS.filt.ts)
>
> Thanks for your help
>
> John
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list