Repository navigation
Conversation
kpagacz
left a comment
There was a problem hiding this comment.
I know it is a draft, and comments on drafts are sometimes annoying, but I think it is better to say this early.
Why do these new functions need to be a shiny module?
They do not use chunks, so no point in using anything from the session object, and I just checked that input is not used anywhere in merge_datasets.
Is there any other reason why we insist on making it a shiny module?
| }, | ||
| expr = all_call_string, | ||
| chunks = chunks_stack, | ||
| expr = all_calls_expression, |
There was a problem hiding this comment.
expr here is a list. I'd suggest to return expression instead, as expression can be evaluated with single expr call. In case of list we need for(i in expr) eval(expr).
expr <- c(
as.expression(quote(ADSL <- 2)),
as.expression(quote(ADTTE <- 3))
)
expr
# expression(ADSL <- 2, ADTTE <- 3)
as.character(expr)
# [1] "ADSL <- 2" "ADTTE <- 3"
eval(expr)
ls()
# [1] "ADSL" "ADTTE"There was a problem hiding this comment.
alternatively you can also convert whole vector instead of each elements:
as.expression(c(quote(ADSL <- 1), quote(ADTTE <- 2)))
We need shiny module because selector_list is a reactive. Also |
I can't imagine why we would like to have a UI for this function when there are no If we ever create a merge_expr module with its own server and UI I would recommend keeping the function extracting the merge expression away from the server functions in the spirit of extraditing as much business logic from EDIT: also, they return things! which makes this whole thing even more confusing. |
I don't have a really strong opinion if it should be a module or the function as far as it's reacting to change of the data_extract inputs. If there will ever be request to make a |
If I remember well, this was a suggestion at some point in the team to visualize the merge process therefore it is staying as a module for now. |
Co-authored-by: Dawid Kałędkowski <[email protected]>
Co-authored-by: Pawel Rucki <[email protected]>
…nto 61_data_merge_dependency@main

closes #61
Dependency on
datasetsandchunkshas been removed from data merge module is such a way:merge_expression_moduleandmerge_expression_srvwhich are the new versions ofdata_merge_moduleanddata_merge_srv. The new modules havedatainstead ofdatasetsas argument and an additional argumentjoin_keys.Merge_datasetsis modified to usedatainstead ofdatasetsand chunks was completely removed from it. It now returns a list ofexpr,columns_source,keyandfilter_info. Nodataorchunksare returned anymore. Be aware thatexprnow is a list of calls instead of character.get_dplyr_callandget_merge_callhave been modified accordingly.data_merge_srvhas been modified in a way to use the samemerge_datasets,get_dplyr_callandget_merge_callscripts. It definesdataandjoin_keysinternally and callsmerge_expression_srvwhere it appendsdataandchunksto the returned list.Please test with the example apps in
merge_expression_module.Randdata_merge_module.R. Note that we still needdatasetsso far as it is still used indata_extractuntil this is done #67The design of the apps would be like this now: