trafficLight<-function(func,...,historical=TRUE,datasources=NULL,aggregate=TRUE,plot=TRUE,text_size=15,ncol=2){
#Calculate the Traffic Light indicators
indicators<-TLstatistics(func,...,historical=historical,datasources=datasources)
#Evaluate the thresholds
TL<-evaluate_TLstatistics(indicators,aggregate=aggregate)
if(!plot){
return(TL)
} else {
p<-plot_TL(TrafficLight = TL,text_size=text_size,ncol=ncol)
return(p)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.