R/outDropEdges.R

outDropEdges  <- function(fo,lowerP = 0.25, upperP = 0.75){
  if(class(fo) != "ForecastingObject"){
    warning("This function should get ForecastingObject as parameter. Please use buildForecastingObject.")
    return(NULL)
  }
  n <- fo$yName
  lower <- quantile(fo$train[,n],lowerP)
  upper <-quantile(fo$train[,n],upperP)

  fo$train <- fo$train[fo$train[,n]>=lower,]
  fo$train <- fo$train[fo$train[,n]<=upper,]


  fo
}
TomaszKoska/RUtils documentation built on May 12, 2019, 1:08 p.m.