R/ggdetrend.R

Defines functions ggdetrend

Documented in ggdetrend

ggdetrend <- function(x) {
  if(!require(ggplot2)){install.packages("ggplot2"); library(ggplot2)}
  ggplot(x, aes(x=date, y= (observation - trend)))+
    geom_line()
}
brisneve/ggplottimeseries documentation built on May 7, 2019, 3:08 p.m.