From a272dcc8591cdc36630a254cf1f0974cb591f57d Mon Sep 17 00:00:00 2001 From: laresbernardo Date: Thu, 5 Dec 2024 12:59:18 +0100 Subject: [PATCH] fix: codefactor https://www.codefactor.io/repository/github/laresbernardo/lares/pull/57 2 --- R/crossbrand2.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/crossbrand2.R b/R/crossbrand2.R index 61afb1274..cca982826 100644 --- a/R/crossbrand2.R +++ b/R/crossbrand2.R @@ -392,8 +392,7 @@ fx_gradient <- function(x, coeff, alpha, inflexion, x_hist_carryover) { fx_objective.chanel <- function(x, coeff, alpha, inflexion, x_hist_carryover) { xAdstocked <- x + mean(x_hist_carryover) - xOut <- -coeff * sum((1 + inflexion**alpha / xAdstocked**alpha)**-1) - return(xOut) + -coeff * sum((1 + inflexion**alpha / xAdstocked**alpha)**-1) } eval_g_eq <- function(X, target_value) {