浏览代码

Add m as argument to make_future_dataframe

Ben Letham 8 年之前
父节点
当前提交
c836b520ab
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      R/R/prophet.R

+ 4 - 0
R/R/prophet.R

@@ -1054,6 +1054,10 @@ sample_predictive_trend <- function(model, df, iteration) {
 #' @export
 make_future_dataframe <- function(m, periods, freq = 'day',
                                   include_history = TRUE) {
+  # For backwards compatability with previous zoo date type,
+  if (freq == 'm') {
+    freq <- 'month'
+  }
   dates <- seq(max(m$history.dates), length.out = periods + 1, by = freq)
   dates <- dates[2:(periods + 1)]  # Drop the first, which is max(history$ds)
   if (include_history) {