Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #355 from 2DegreesInvesting/353_named-arg-write-log
Browse files Browse the repository at this point in the history
make function arg in write_log explicit
  • Loading branch information
jacobvjk authored Dec 11, 2020
2 parents 839f425 + 114a7f9 commit 55e4950
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions 0_web_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,14 @@ check_input_file_contents <- function(portfolio_, portfolio_name, investor_name)
if (length(setdiff(necessary_columns, colnames(portfolio_clean))) > 0) {
missing_cols <- setdiff(necessary_columns, colnames(portfolio_clean))

write_log(msg = paste(
"The uploaded portfolio file contains the following missing variables:", str_c(missing_cols, collapse = ", "),
"\n For correct analysis, please ensure the following required variables are included in your uploaded portfolio file:",
str_c(necessary_columns, collapse = ", ")
))
write_log(
msg = paste(
"The uploaded portfolio file contains the following missing variables:", str_c(missing_cols, collapse = ", "),
"\n For correct analysis, please ensure the following required variables are included in your uploaded portfolio file:",
str_c(necessary_columns, collapse = ", ")
),
file_path = log_path
)
stop(paste0("Missing inputs for this portfolio: ", str_c(missing_cols, collapse = ", ")))
}

Expand Down

0 comments on commit 55e4950

Please sign in to comment.