Skip to content

Commit

Permalink
CRAN v.3.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed Sep 1, 2022
1 parent 01610a4 commit a79c1f5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 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.7.1
Version: 3.7.2
Authors@R: c(
person("Gufeng", "Zhou", , "gufeng@fb.com", c("aut")),
person("Leonel", "Sentana", , "leonelsentana@fb.com", c("aut")),
Expand Down
4 changes: 3 additions & 1 deletion R/R/auxiliary.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ flatten_hyps <- function(x) {
if (is.null(x)) {
return(x)
}
temp <- sapply(x, function(x) sprintf("[%s]", paste(if (is.numeric(x)) signif(x, 6) else x, collapse = ", ")))
temp <- sapply(x, function(x) {
sprintf("[%s]", paste(if (is.numeric(x)) signif(x, 6) else x, collapse = ", "))
})
paste(paste0(" ", names(temp), ":"), temp, collapse = "\n")
}

Expand Down
2 changes: 1 addition & 1 deletion R/R/checks.R
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ check_factorvars <- function(dt_input, factor_vars, context_vars, organic_vars)
temp <- select(dt_input, all_of(c(context_vars, organic_vars)))
are_not_numeric <- !sapply(temp, is.numeric)
if (any(are_not_numeric)) {
these <- are_not_numeric[!are_not_numeric %in% factor_vars]
these <- are_not_numeric[!names(are_not_numeric) %in% factor_vars]
these <- these[these]
if (length(these) > 0) {
message("Automatically set these variables as 'factor_vars': ", v2t(names(these)))
Expand Down
5 changes: 3 additions & 2 deletions R/R/outputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ robyn_outputs <- function(InputCollect, OutputModels,

if (csv_out %in% c("all", "pareto")) {
if (!quiet) message(paste(">> Exporting", csv_out, "results as CSVs into directory..."))
robyn_csv(OutputCollect, csv_out, export = export)
robyn_csv(InputCollect, OutputCollect, csv_out, export = export)
}

if (!quiet) message(">> Exporting general plots into directory...")
Expand Down Expand Up @@ -209,7 +209,7 @@ Pareto-front ({x$pareto_fronts}) All solutions ({nSols}): {paste(x$allSolutions,
#' @rdname robyn_outputs
#' @return Invisible \code{NULL}.
#' @export
robyn_csv <- function(OutputCollect, csv_out = NULL, export = TRUE) {
robyn_csv <- function(InputCollect, OutputCollect, csv_out = NULL, export = TRUE) {
if (export) {
check_class("robyn_outputs", OutputCollect)
temp_all <- OutputCollect$allPareto
Expand All @@ -222,6 +222,7 @@ robyn_csv <- function(OutputCollect, csv_out = NULL, export = TRUE) {
write.csv(temp_all$xDecompAgg, paste0(OutputCollect$plot_folder, "all_aggregated.csv"))
}
if (!is.null(csv_out)) {
write.csv(InputCollect$dt_input, paste0(OutputCollect$plot_folder, "raw_data.csv"))
write.csv(OutputCollect$mediaVecCollect, paste0(OutputCollect$plot_folder, "pareto_media_transform_matrix.csv"))
write.csv(OutputCollect$xDecompVecCollect, paste0(OutputCollect$plot_folder, "pareto_alldecomp_matrix.csv"))
}
Expand Down
2 changes: 1 addition & 1 deletion R/man/robyn_inputs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions R/man/robyn_outputs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions R/man/robyn_refresh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a79c1f5

Please sign in to comment.