Skip to content

Commit

Permalink
fix: date_range for robyn_response #772 #734
Browse files Browse the repository at this point in the history
- date_range in robyn_response should only refer to modelling window, not the total dataset.
- bump up dev version
  • Loading branch information
gufengzhou committed Jul 24, 2023
1 parent 62ec3b2 commit 1f72234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Robyn
Type: Package
Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science
Version: 3.10.4.9001
Version: 3.10.4.9002
Authors@R: c(
person("Gufeng", "Zhou", , "[email protected]", c("aut")),
person("Leonel", "Sentana", , "[email protected]", c("aut")),
Expand Down
6 changes: 3 additions & 3 deletions R/R/response.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ robyn_response <- function(InputCollect = NULL,
all_values <- pull(dt_input, metric_name)

if (usecase == "all_historical_vec") {
ds_list <- check_metric_dates(date_range = "all", all_dates, dayInterval, quiet, ...)
ds_list <- check_metric_dates(date_range = "all", all_dates[1:endRW], dayInterval, quiet, ...)
#val_list <- check_metric_value(metric_value, metric_name, all_values, ds_list$metric_loc)
} else if (usecase == "unit_metric_default_last_n") {
ds_list <- check_metric_dates(date_range = paste0("last_", length(metric_value)), all_dates, dayInterval, quiet, ...)
ds_list <- check_metric_dates(date_range = paste0("last_", length(metric_value)), all_dates[1:endRW], dayInterval, quiet, ...)
#val_list <- check_metric_value(metric_value, metric_name, all_values, ds_list$metric_loc)
} else {
ds_list <- check_metric_dates(date_range, all_dates, dayInterval, quiet, ...)
ds_list <- check_metric_dates(date_range, all_dates[1:endRW], dayInterval, quiet, ...)
}
val_list <- check_metric_value(metric_value, metric_name, all_values, ds_list$metric_loc)
date_range_updated <- ds_list$date_range_updated
Expand Down

0 comments on commit 1f72234

Please sign in to comment.