Skip to content

[Bug]: problem with datasets that have different merging keys with parent #502

@averissimo

Description

@averissimo

What happened?

This surfaced with insightsengineering/teal.data#215 (initially reported by @vedhav from CI fail in teal)

I believe it hasn't been caugh before as datasets usually have the same merging key

Example below uses a dataset from a test in teal.

td <- teal.data::teal_data() |> 
  within(d1 <- data.frame(id = 1:5, pk = c(2, 3, 2, 1, 4), val = 1:5)) |> 
  within(d2 <- data.frame(id = 1:5, value = 1:5))

teal.data::datanames(td) <- c("d1", "d2")
teal.data::join_keys(td) <- teal.data::join_keys(teal.data::join_key("d1", "d2", c("pk" = "id")))
teal.data::parents(td) <- list(d2 = "d1")

app <- teal::init(
  data = td,
  modules = list(
    teal::example_module(label = "example teal module")
  )
) |> shiny::runApp()

image

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcore

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions