Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dataset switch in join block does not update by #273

Open
nbenn opened this issue Feb 7, 2024 · 3 comments · May be fixed by #274
Open

Dataset switch in join block does not update by #273

nbenn opened this issue Feb 7, 2024 · 3 comments · May be fixed by #274

Comments

@nbenn
Copy link
Collaborator

nbenn commented Feb 7, 2024

If I start the app with 2 compatible datasets, I add a third stack with a data_block, not compatible with the second stack data set, select this new stack as my new y value, the by choice doesn't reflect the situation and keeps the old values in memory. The result is shown in the below image where I am trying to join adverse events data with the airquality data (which doesn't make sense of course).

library(blockr)
library(blockr.data)

lab_data_block <- function(...) {
  initialize_block(new_data_block(
    ...,
    dat = as.environment("package:blockr.data"),
    selected = "lab"
  ))
}

ae_data_block <- function(...) {
  initialize_block(new_data_block(
    ...,
    dat = as.environment("package:blockr.data"),
    selected = "ae"
  ))
}

serve_workspace(
  stack1 = new_stack(lab_data_block, head_block),
  stack2 = new_stack(ae_data_block, join_block),
  title = "My workspace"
)
Screenshot 2024-02-07 at 12 08 35

Originally posted by @DivadNojnarg in #264 (comment)

@DivadNojnarg
Copy link
Collaborator

@nbenn #272 does not seem to auto fix this one.

@nbenn
Copy link
Collaborator Author

nbenn commented Feb 7, 2024

I saw, yes. I might have a solution though.

@JohnCoene
Copy link
Member

I think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants