Skip to content

[Feature Request]: c of teal.slices should treat duplicated teal_slice as a shared filters #674

@gogonzo

Description

@gogonzo

Feature description

IMO when module_specific = TRUE, when two identical slices (not identical(ts), but identical(as.list(<ts>))) then only first one should be used as a "common filter". Ask @gogonzo for more context

c(
  teal::teal_slices(
    teal.slice::teal_slice("ADSL", varname = "AGE", id = "ADSL_AGE"),
    module_specific = TRUE,
    mapping = list(
      `mod1` = "ADSL_AGE"
    )
  ),
    teal::teal_slices(
      teal.slice::teal_slice("ADSL", varname = "AGE", id = "ADSL_AGE"),
      module_specific = TRUE,
      mapping = list(
        `mod2` = "ADSL_AGE"
      )
    )
)
# Error in teal.slice::teal_slices(..., exclude_varnames = exclude_varnames,  : 
#  Some teal_slice objects have the same id:
# ADSL_AGE

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions