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

[summary] data refactor #895

Closed
gogonzo opened this issue Aug 11, 2023 · 0 comments · Fixed by #925, insightsengineering/teal.slice#470, insightsengineering/teal.data#178 or #957
Closed

[summary] data refactor #895

gogonzo opened this issue Aug 11, 2023 · 0 comments · Fixed by #925, insightsengineering/teal.slice#470, insightsengineering/teal.data#178 or #957
Assignees
Labels

Comments

@gogonzo
Copy link
Contributor

gogonzo commented Aug 11, 2023

part of #937

1. Simplifying cdisc_data and teal_data

Specifying data in teal can be changed to simply specifying a list of datasets and code (automatically parsed)

library(scda)
ADSL <- synthetic_cdisc_data("latest")$adsl
ADTTE <- synthetic_cdisc_data("latest")$adtte
ADRS <- synthetic_cdisc_data("latest")$adrs


data <- teal.data::cdisc_data(
  ADSL = ADSL, ADTTE = ADTTE, ADRS = ADRS,
  code = quote({
    ADSL <- scda::synthetic_cdisc_data("latest")$adsl
    ADTTE <- scda::synthetic_cdisc_data("latest")$adtte
    ADRS <- scda::synthetic_cdisc_data("latest")$adrs
  })
)

In the same time, it is still possible to use legacy cdisc_dataset which is soft deprecated

cdisc_data(
    cdisc_dataset("ADSL", ADSL),
    cdisc_dataset("ADTTE", ADTTE),
    cdisc_dataset("ADRS", ADRS),
    code = '
      ADSL <- scda::synthetic_cdisc_data("latest")$adsl
      ADTTE <- scda::synthetic_cdisc_data("latest")$adtte
      ADRS <- scda::synthetic_cdisc_data("latest")$adrs
    '
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment