Skip to content

Commit

Permalink
when data is splitted and the user works in the OperationModule now n…
Browse files Browse the repository at this point in the history
…ew columns are added to backup_df
  • Loading branch information
Konrad1991 committed Nov 12, 2024
1 parent bab0531 commit c2a8c03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bs/R/OperationsModule.R
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,16 @@ OperationEditorServer <- function(id, data) {
new <- eval(parse(text = code), envir = eval_env)
check_type_res(new)
r_vals$df[, new_col] <- new

if (!is.null(data$backup_df)) {
eval_env <- new.env()
list2env(r_vals$intermediate_vars, envir = eval_env)
list2env(data$backup_df, envir = eval_env) # NOTE: this adds each column as own variable
new <- eval(parse(text = code), envir = eval_env)
check_type_res(new)
data$backup_df[, new_col] <- new
showNotification("Conducted operation also for entire dataset and not only the subset")
}
})
if (inherits(e, "try-error")) {
err <- conditionMessage(attr(e, "condition"))
Expand Down
1 change: 0 additions & 1 deletion bs/R/assumption.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ assServer <- function(id, data, listResults) {
data$filter_group <- NULL
})


output$open_formula_editor_corr <- renderUI({ # TODO: change to unique identifier probably via [["open_formula_editor"]]
actionButton(NS(id, "open_formula_editor"),
"Open formula editor",
Expand Down

0 comments on commit c2a8c03

Please sign in to comment.