Skip to content

Commit

Permalink
fix: totals var used for fd and boolean #54
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed May 28, 2024
1 parent 776e811 commit f11ad64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/robyn.R
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ robyn_performance <- function(
) %>%
arrange(desc(.data$spend))
# Create TOTAL row
totals <- ret[1, 1:3] %>%
totals_df <- ret[1, 1:3] %>%
mutate(
channel = "PROMOTIONAL TOTAL",
metric = metric,
Expand Down Expand Up @@ -527,7 +527,7 @@ robyn_performance <- function(
response = resp_baseline + sum(ret$response)
)
# Join everything together
ret <- rbind(totals, ret)
ret <- rbind(totals_df, ret)
if (totals) ret <- rbind(ret, totals_base, grand_total)
ret <- left_join(ret, mktg_contr2, "channel")
return(ret)
Expand Down

0 comments on commit f11ad64

Please sign in to comment.