Skip to content

Commit

Permalink
fix R CMD CHECKS
Browse files Browse the repository at this point in the history
  • Loading branch information
m7pr committed Dec 13, 2024
1 parent 38228a9 commit 20bef3d
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 40 deletions.
8 changes: 5 additions & 3 deletions R/choices_labeled.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
#' @return Named `character` vector.
#'
#' @examples
#' library(teal.data)
#' library(shiny)
#'
#' ADSL <- teal.data::rADSL
#' ADTTE <- teal.data::rADTTE
#' ADSL <- rADSL
#' ADTTE <- rADTTE
#'
#' choices1 <- choices_labeled(names(ADSL), col_labels(ADSL, fill = FALSE))
#' choices2 <- choices_labeled(ADTTE$PARAMCD, ADTTE$PARAM)
Expand Down Expand Up @@ -149,7 +150,8 @@ choices_labeled <- function(choices, labels, subset = NULL, types = NULL) {
#' @return Named `character` vector with additional attributes or `delayed_data` object.
#'
#' @examples
#' ADRS <- teal.data::rADRS
#' library(teal.data)
#' ADRS <- rADRS
#' variable_choices(ADRS)
#' variable_choices(ADRS, subset = c("PARAM", "PARAMCD"))
#' variable_choices(ADRS, subset = c("", "PARAM", "PARAMCD"))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Below is a small example usage:

```r
library(teal.transform)
ADSL <- rADSL
ADSL <- teal.data::rADSL

adsl_extract <- data_extract_spec(
dataname = "ADSL",
Expand Down
5 changes: 3 additions & 2 deletions man/choices_labeled.Rd

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

3 changes: 2 additions & 1 deletion man/variable_choices.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/test-data_extract_module.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADLB <- rADLB
ADTTE <- rADTTE
ADLB <- teal.data::rADLB
ADTTE <- teal.data::rADTTE

testthat::test_that("Single filter", {
data_extract <- data_extract_spec(
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-data_extract_multiple_srv.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ADSL <- rADSL
ADLB <- rADLB
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADLB <- teal.data::rADLB
ADTTE <- teal.data::rADTTE

data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE), ADLB = reactive(ADLB))
join_keys <- teal.data::default_cdisc_join_keys[c("ADSL", "ADTTE", "ADLB")]
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-data_extract_spec.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE))
key_list <- list(ADSL = c("STUDYID", "USUBJID"), ADTTE = c("STUDYID", "USUBJID", "PARAMCD"))

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-data_extract_srv.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ADSL <- rADSL
ADLB <- rADLB
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADLB <- teal.data::rADLB
ADTTE <- teal.data::rADTTE

data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE), ADLB = reactive(ADLB))
join_keys <- teal.data::default_cdisc_join_keys[c("ADSL", "ADTTE", "ADLB")]
Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-delayed_data_extract.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Contains integration tests between delayed data loading objects and
# the objects responsible for loading, pulling and filtering the data
ADSL <- rADSL
ADTTE <- rADTTE
ADAE <- rADAE
ADRS <- rADRS
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
ADAE <- teal.data::rADAE
ADRS <- teal.data::rADRS

data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE), ADAE = reactive(ADAE), ADRS = reactive(ADRS))
join_keys <- teal.data::default_cdisc_join_keys[c("ADSL", "ADTTE", "ADAE", "ADRS")]
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-filter_spec.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE), ADLB = reactive(ADLB))
join_keys <- teal.data::default_cdisc_join_keys[c("ADSL", "ADTTE", "ADLB")]
primary_keys_list <- lapply(join_keys, function(x) x[[1]])
Expand Down Expand Up @@ -218,7 +218,7 @@ testthat::test_that("filter_spec_internal", {
})

testthat::test_that("filter_spec_internal contains dataname", {
ADSL <- rADSL
ADSL <- teal.data::rADSL

x_filter <- filter_spec_internal(
vars_choices = variable_choices(ADSL)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-resolve.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE

arm_ref_comp <- list(
ARMCD = list(
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-resolve_delayed.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
adsl <- rADSL
adtte <- rADTTE
adsl <- teal.data::rADSL
adtte <- teal.data::rADTTE

data_list <- list(ADSL = reactive(adsl), ADTTE = reactive(adtte))
join_keys <- teal.data::default_cdisc_join_keys[c("ADSL", "ADTTE")]
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-select_spec.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
adsl <- rADSL
adtte <- rADTTE
adsl <- teal.data::rADSL
adtte <- teal.data::rADTTE
data_list <- list(ADSL = reactive(adsl), ADTTE = reactive(adtte))
primary_keys_list <- list(ADSL = c("STUDYID", "USUBJID"), ADTTE = c("STUDYID", "USUBJID", "PARAMCD"))

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-value_choices.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE))
primary_keys_list <- list(ADSL = c("STUDYID", "USUBJID"), ADTTE = c("STUDYID", "USUBJID", "PARAMCD"))

Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-variable_choices.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
data_list <- list(ADSL = reactive(ADSL), ADTTE = reactive(ADTTE))
primary_keys_list <- list(ADSL = c("STUDYID", "USUBJID"), ADTTE = c("STUDYID", "USUBJID", "PARAMCD"))

Expand Down
4 changes: 2 additions & 2 deletions vignettes/data-extract-merge.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ library(teal.data)
library(shiny)
# Define data.frame objects
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
# create a list of reactive data.frame objects
datasets <- list(
Expand Down
4 changes: 2 additions & 2 deletions vignettes/data-extract.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ library(teal.data)
library(shiny)
# Define data.frame objects
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
# create a list of reactive data.frame objects
datasets <- list(
Expand Down
4 changes: 2 additions & 2 deletions vignettes/data-merge.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ library(teal.data)
library(shiny)
# Define data.frame objects
ADSL <- rADSL
ADTTE <- rADTTE
ADSL <- teal.data::rADSL
ADTTE <- teal.data::rADTTE
# create a list of reactive data.frame objects
datasets <- list(
Expand Down

0 comments on commit 20bef3d

Please sign in to comment.