Skip to content

Commit

Permalink
recode: restructured modNLSCollect as list
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed Aug 12, 2022
1 parent 1935868 commit ef12599
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions R/R/inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -721,12 +721,11 @@ robyn_engineering <- function(x, quiet = FALSE, ...) {
InputCollect[["dt_mod"]] <- dt_transform
InputCollect[["dt_modRollWind"]] <- dt_transform[rollingWindowStartWhich:rollingWindowEndWhich, ]
InputCollect[["dt_inputRollWind"]] <- dt_inputRollWind
InputCollect[["modNLSCollect"]] <- modNLSCollect
InputCollect[["plotNLSCollect"]] <- plotNLSCollect
InputCollect[["yhatNLSCollect"]] <- yhatNLSCollect

# InputCollect[["exposure_selector"]] <- exposure_selector
# InputCollect[["mediaCostFactor"]] <- mediaCostFactor
InputCollect[["modNLS"]] <- list(
results = modNLSCollect,
yhat = yhatNLSCollect,
plots = plotNLSCollect
)
return(InputCollect)
}

Expand Down
4 changes: 2 additions & 2 deletions demo/demo.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ print(InputCollect)

#### Check spend exposure fit if available
if (length(InputCollect$exposure_vars) > 0) {
InputCollect$plotNLSCollect$facebook_I
InputCollect$plotNLSCollect$search_clicks_P
InputCollect$modNLS$plots$facebook_I
InputCollect$modNLS$plots$search_clicks_P
}

##### Manually save and import InputCollect as JSON file
Expand Down

0 comments on commit ef12599

Please sign in to comment.