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

[Bug]: Grand child doesn't have subject counts #523

Open
gogonzo opened this issue Jan 15, 2024 · 1 comment
Open

[Bug]: Grand child doesn't have subject counts #523

gogonzo opened this issue Jan 15, 2024 · 1 comment
Labels
bug Something isn't working core

Comments

@gogonzo
Copy link
Contributor

gogonzo commented Jan 15, 2024

What happened?

data <- teal_data()
data <- within(data, {
  parent <- data.frame(id = 1:10, a = runif(10), b = runif(10))
  child <- data.frame(id = 1:100, parent_id = rep(1:10, each = 10), c = runif(100), d = runif(100))
  grand_child <- data.frame(id = 1:1000, child_id = rep(1:100, each = 10), e = runif(1000), f = runif(1000))
})
join_keys(data) <- join_keys(
  join_key("child", "parent", keys = c("parent_id" = "id")),
  join_key("grand_child", "child", keys = c("child_id" = "id"))
)


app <- init(
  data = data,
  modules = example_module()
)
shinyApp(app$ui, app$server)
image
@gogonzo gogonzo added bug Something isn't working core labels Jan 15, 2024
@gogonzo
Copy link
Contributor Author

gogonzo commented Jan 17, 2024

I'm not sure if this could be done before. If you have a grand-child dataset then which information should be taken to determine subjects? Join-keys are determining id of it's parent which is still a child. Information about the subjects in the parent are not obtainable at this moment, this should be done recursively. So I'm questioning "subjects" in general - what does it mean in general. If we have a structure with

  • orders
  • order_items
  • items

Then items have no such thing like "subjects". In ADaM three levels could look like this

  • parent (ADSL)
  • analysis (ADTTE)
  • col_details (PARAM)

We need to find the way to properly (universaly) describe parent-child relationship there. Theoretically it is rather:

  • observations
  • parent observations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

No branches or pull requests

1 participant