Skip to content

Commit

Permalink
Merge f808c40 into 0a1ff45
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikeyakirar committed Jul 5, 2023
2 parents 0a1ff45 + f808c40 commit 86cf39d
Show file tree
Hide file tree
Showing 38 changed files with 382 additions and 315 deletions.
4 changes: 0 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,13 @@ Imports:
Suggests:
knitr,
rmarkdown,
scda (>= 0.1.5),
scda.2022 (>= 0.1.3),
shinytest,
testthat (>= 3.1.5)
VignetteBuilder:
knitr
RdMacros:
lifecycle
Remotes:
insightsengineering/scda.2022@*release,
insightsengineering/scda@*release,
insightsengineering/teal.code@*release,
insightsengineering/teal.data@*release,
insightsengineering/teal.logger@*release,
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

### Miscellaneous

* Examples use `scda.2022` instead of `scda.2021`
* Removed `scda` package dependency from examples.

# teal.transform 0.2.0

Expand Down
13 changes: 4 additions & 9 deletions R/choices_labeled.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
#'
#' @examples
#' library(shiny)
#' library(scda)
#'
#' ADSL <- synthetic_cdisc_data("latest")$adsl
#' ADTTE <- synthetic_cdisc_data("latest")$adtte
#' ADSL <- rADSL
#' ADTTE <- rADTTE
#' choices1 <- choices_labeled(names(ADSL), formatters::var_labels(ADSL, fill = FALSE))
#' choices2 <- choices_labeled(ADTTE$PARAMCD, ADTTE$PARAM)
#' # if only a subset of variables are needed, use subset argument
Expand Down Expand Up @@ -141,9 +140,7 @@ choices_labeled <- function(choices, labels, subset = NULL, types = NULL) {
#' @export
#'
#' @examples
#' library(scda)
#' ADRS <- synthetic_cdisc_data("latest")$adrs
#'
#' ADRS <- rADRS
#' variable_choices(ADRS)
#' variable_choices(ADRS, subset = c("PARAM", "PARAMCD"))
#' variable_choices(ADRS, subset = c("", "PARAM", "PARAMCD"))
Expand Down Expand Up @@ -300,9 +297,7 @@ variable_choices.TealDatasetConnector <- function(data, # nolint
#' @export
#'
#' @examples
#' library(scda)
#' ADRS <- synthetic_cdisc_data("latest")$adrs
#'
#' ADRS <- rADRS
#' value_choices(ADRS, "PARAMCD", "PARAM", subset = c("BESRSPI", "INVET"))
#' value_choices(ADRS, c("PARAMCD", "ARMCD"), c("PARAM", "ARM"))
#' value_choices(ADRS, c("PARAMCD", "ARMCD"), c("PARAM", "ARM"),
Expand Down
3 changes: 1 addition & 2 deletions R/choices_selected.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ no_select_keyword <- "-- no selection --"
#' selected = "C"
#' )
#'
#' library(scda)
#' ADSL <- synthetic_cdisc_data("latest")$adsl
#' ADSL <- rADSL
#' choices_selected(variable_choices(ADSL), "SEX")
#'
#' # How to select nothing
Expand Down
64 changes: 64 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#' Random adverse events
#'
#' @description Random adverse events
#' @docType data
#'
#' @usage data(rADAE)
#'
#' @keywords datasets internal
#'
#' @source internal
#' @name rADAE
"rADAE"

#' Random lab analysis
#'
#' @description Random lab analysis
#' @docType data
#'
#' @usage data(rADLB)
#'
#' @keywords datasets internal
#'
#' @source internal
#' @name rADLB
"rADLB"

#' Random response
#'
#' @description Random response
#' @docType data
#'
#' @usage data(rADRS)
#'
#' @keywords datasets internal
#'
#' @source internal
#' @name rADRS
"rADRS"

#' Random patient listing
#'
#' @description Random patient listing
#' @docType data
#'
#' @keywords datasets internal
#'
#' @usage data(rADSL)
#'
#' @source internal
#' @name rADSL
"rADSL"

#' Random Time to Event Analysis Dataset
#'
#' @description Random Time to Event Analysis Dataset
#' @docType data
#'
#' @keywords datasets internal
#'
#' @usage data(rADTTE)
#'
#' @source internal
#' @name rADTTE
"rADTTE"
3 changes: 1 addition & 2 deletions R/filter_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ filter_spec <- function(vars,
#' vars_multiple = TRUE
#' )
#'
#' library(scda)
#' ADRS <- synthetic_cdisc_data("latest")$adrs
#' ADRS <- rADRS
#' teal.transform:::filter_spec_internal(
#' vars_choices = variable_choices(ADRS),
#' vars_selected = "PARAMCD",
Expand Down
4 changes: 1 addition & 3 deletions R/resolve.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
#' @return Resolved object.
#'
#' @examples
#' library(scda)
#'
#' ADSL <- synthetic_cdisc_data("latest")$adsl
#' ADSL <- rADSL
#' attr(ADSL, "keys") <- teal.data::get_cdisc_keys("ADSL")
#' data_list <- list(ADSL = shiny::reactive(ADSL))
#' keys <- list(ADSL = attr(ADSL, "keys"))
Expand Down
4 changes: 1 addition & 3 deletions R/resolve_delayed.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
#' @export
#'
#' @examples
#' library(scda)
#'
#' ADSL <- synthetic_cdisc_data("latest")$adsl
#' ADSL <- rADSL
#' shiny::isolate({
#' ds <- teal.slice::init_filtered_data(
#' list(ADSL = list(
Expand Down
Binary file added data/rADAE.rda
Binary file not shown.
Binary file added data/rADLB.rda
Binary file not shown.
Binary file added data/rADRS.rda
Binary file not shown.
Binary file added data/rADSL.rda
Binary file not shown.
Binary file added data/rADTTE.rda
Binary file not shown.
5 changes: 2 additions & 3 deletions man/choices_labeled.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/choices_selected.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/filter_spec_internal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/rADAE.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/rADLB.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/rADRS.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/rADSL.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions man/rADTTE.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions man/resolve.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions man/resolve_delayed.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions man/value_choices.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions man/variable_choices.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions staged_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ upstream_repos:
insightsengineering/teal.slice:
repo: insightsengineering/teal.slice
host: https://github.com
insightsengineering/scda:
repo: insightsengineering/scda
host: https://github.com
insightsengineering/scda.2022:
repo: insightsengineering/scda.2022
host: https://github.com
insightsengineering/formatters:
repo: insightsengineering/formatters
host: https://github.com
Expand Down
6 changes: 2 additions & 4 deletions tests/testthat/test-data_extract_module.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
library(scda)
ADSL <- synthetic_cdisc_data("rcd_2022_06_27")$adsl # nolint
ADLB <- synthetic_cdisc_data("rcd_2022_06_27")$adlb # nolint
ADTTE <- synthetic_cdisc_data("rcd_2022_06_27")$adtte # nolint
ADLB <- rADLB # nolint
ADTTE <- rADTTE # nolint

testthat::test_that("Single filter", {
data_extract <- data_extract_spec(
Expand Down
Loading

0 comments on commit 86cf39d

Please sign in to comment.