Explorar el Código

R check cleanups

Ben Letham hace 7 años
padre
commit
e0cf400e23
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      R/R/diagnostics.R
  2. 1 1
      R/R/plot.R

+ 1 - 1
R/R/diagnostics.R

@@ -34,7 +34,7 @@ generate_cutoffs <- function(df, horizon, initial, period) {
     }
     }
     result <- c(result, cutoff)
     result <- c(result, cutoff)
   }
   }
-  result <- head(result, -1)
+  result <- utils::head(result, -1)
   if (length(result) == 0) {
   if (length(result) == 0) {
     stop(paste(
     stop(paste(
       'Less data than horizon after initial window.',
       'Less data than horizon after initial window.',

+ 1 - 1
R/R/plot.R

@@ -390,7 +390,7 @@ dyplot.prophet <- function(x, fcst, uncertainty=TRUE,
   forecast.label='Predicted'
   forecast.label='Predicted'
   actual.label='Actual'
   actual.label='Actual'
   # create data.frame for plotting
   # create data.frame for plotting
-  df <- prophet:::df_for_plotting(x, fcst)
+  df <- df_for_plotting(x, fcst)
   
   
   # build variables to include, or not, the uncertainty data
   # build variables to include, or not, the uncertainty data
   if(uncertainty && exists("yhat_lower", where = df))
   if(uncertainty && exists("yhat_lower", where = df))