R/tst.plot.R

Defines functions tst.plot

# plotting tst.variables

# Helper functions for estimating parameters of equations to be used in a tst.model

# This is simply a wrapper xts
source("~/GitHub/TST themes/Chart themes.R")

tst.plot <- function(variable, date = NA, data = m){

x <- m %>%
  dplyr::select(Date, paste0(variable)) 

x <- x[complete.cases(x),]

x <- x %>% 
  gather(Var, Val, -Date)

p <- ggplot(x)+
  geom_line(aes(x = Date, y = Val, colour = Var))+
  tst_theme()+
  scale_colour_tst()+
  theme(legend.title = element_blank())

return(p)
      
  
}
AdamElderfield/tst_package documentation built on Dec. 5, 2019, 2:08 a.m.