diff --git a/R/choices_labeled.R b/R/choices_labeled.R index aefc8575..bbc8bdaa 100644 --- a/R/choices_labeled.R +++ b/R/choices_labeled.R @@ -23,8 +23,8 @@ #' @return Named `character` vector. #' #' @examples -#' library(shiny) #' library(teal.data) +#' library(shiny) #' #' ADSL <- rADSL #' ADTTE <- rADTTE @@ -151,7 +151,6 @@ choices_labeled <- function(choices, labels, subset = NULL, types = NULL) { #' #' @examples #' library(teal.data) -#' #' ADRS <- rADRS #' variable_choices(ADRS) #' variable_choices(ADRS, subset = c("PARAM", "PARAMCD")) @@ -267,7 +266,7 @@ variable_choices.data.frame <- function(data, subset = NULL, fill = TRUE, key = #' @return named character vector or `delayed_data` object. #' #' @examples -#' ADRS <- rADRS +#' ADRS <- teal.data::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"), diff --git a/R/choices_selected.R b/R/choices_selected.R index ad98f880..9f8766c0 100644 --- a/R/choices_selected.R +++ b/R/choices_selected.R @@ -50,7 +50,7 @@ no_select_keyword <- "-- no selection --" #' selected = "C" #' ) #' -#' ADSL <- rADSL +#' ADSL <- teal.data::rADSL #' choices_selected(variable_choices(ADSL), "SEX") #' #' # How to select nothing diff --git a/R/data.R b/R/data.R deleted file mode 100644 index debbb89d..00000000 --- a/R/data.R +++ /dev/null @@ -1,59 +0,0 @@ -#' Random adverse events -#' -#' @docType data -#' -#' @usage rADAE -#' -#' @keywords datasets internal -#' -#' @source internal -#' @name rADAE -"rADAE" - -#' Random lab analysis -#' -#' @docType data -#' -#' @usage rADLB -#' -#' @keywords datasets internal -#' -#' @source internal -#' @name rADLB -"rADLB" - -#' Random response -#' -#' @docType data -#' -#' @usage rADRS -#' -#' @keywords datasets internal -#' -#' @source internal -#' @name rADRS -"rADRS" - -#' Random patient listing -#' -#' @docType data -#' -#' @usage rADSL -#' -#' @keywords datasets internal -#' -#' @source internal -#' @name rADSL -"rADSL" - -#' Random time to event analysis dataset -#' -#' @docType data -#' -#' @usage rADTTE -#' -#' @keywords datasets internal -#' -#' @source internal -#' @name rADTTE -"rADTTE" diff --git a/R/resolve_delayed.R b/R/resolve_delayed.R index b6ec8ece..007ac2d0 100644 --- a/R/resolve_delayed.R +++ b/R/resolve_delayed.R @@ -12,7 +12,7 @@ #' @examples #' library(shiny) #' -#' ADSL <- rADSL +#' ADSL <- teal.data::rADSL #' isolate({ #' data_list <- list(ADSL = reactive(ADSL)) #' diff --git a/README.md b/README.md index 69650647..6648c87a 100644 --- a/README.md +++ b/README.md @@ -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", diff --git a/data-raw/data.R b/data-raw/data.R deleted file mode 100644 index f7d1175c..00000000 --- a/data-raw/data.R +++ /dev/null @@ -1,19 +0,0 @@ -## code to prepare `data` for testing examples - -rADAE <- random.cdisc.data::cadae -usethis::use_data(rADAE, overwrite = TRUE) - -rADLB <- random.cdisc.data::cadlb -usethis::use_data(rADLB, overwrite = TRUE) - -rADRS <- random.cdisc.data::cadrs -usethis::use_data(rADRS, overwrite = TRUE) - -rADSL <- random.cdisc.data::cadsl -usethis::use_data(rADSL, overwrite = TRUE) - -rADTTE <- random.cdisc.data::cadtte -usethis::use_data(rADTTE, overwrite = TRUE) - -# Use :: prefix in examples/tests/vignettes when accessing rAD## data -# objects in case similar dataset is also exported exist in other packages. diff --git a/data/rADAE.rda b/data/rADAE.rda deleted file mode 100644 index a1ad1463..00000000 Binary files a/data/rADAE.rda and /dev/null differ diff --git a/data/rADLB.rda b/data/rADLB.rda deleted file mode 100644 index 18808730..00000000 Binary files a/data/rADLB.rda and /dev/null differ diff --git a/data/rADRS.rda b/data/rADRS.rda deleted file mode 100644 index 9c434fe2..00000000 Binary files a/data/rADRS.rda and /dev/null differ diff --git a/data/rADSL.rda b/data/rADSL.rda deleted file mode 100644 index 3f370533..00000000 Binary files a/data/rADSL.rda and /dev/null differ diff --git a/data/rADTTE.rda b/data/rADTTE.rda deleted file mode 100644 index a9158029..00000000 Binary files a/data/rADTTE.rda and /dev/null differ diff --git a/man/choices_labeled.Rd b/man/choices_labeled.Rd index f1a9be18..a873480a 100644 --- a/man/choices_labeled.Rd +++ b/man/choices_labeled.Rd @@ -46,8 +46,8 @@ Duplicated elements from \code{choices} get removed. }} \examples{ -library(shiny) library(teal.data) +library(shiny) ADSL <- rADSL ADTTE <- rADTTE diff --git a/man/choices_selected.Rd b/man/choices_selected.Rd index 92e87e5d..2fc83675 100644 --- a/man/choices_selected.Rd +++ b/man/choices_selected.Rd @@ -75,7 +75,7 @@ choices_selected( selected = "C" ) -ADSL <- rADSL +ADSL <- teal.data::rADSL choices_selected(variable_choices(ADSL), "SEX") # How to select nothing diff --git a/man/rADAE.Rd b/man/rADAE.Rd deleted file mode 100644 index 6e57b7d7..00000000 --- a/man/rADAE.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{rADAE} -\alias{rADAE} -\title{Random adverse events} -\format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 1934 rows and 92 columns. -} -\source{ -internal -} -\usage{ -rADAE -} -\description{ -Random adverse events -} -\keyword{datasets} -\keyword{internal} diff --git a/man/rADLB.Rd b/man/rADLB.Rd deleted file mode 100644 index a5430d32..00000000 --- a/man/rADLB.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{rADLB} -\alias{rADLB} -\title{Random lab analysis} -\format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 8400 rows and 102 columns. -} -\source{ -internal -} -\usage{ -rADLB -} -\description{ -Random lab analysis -} -\keyword{datasets} -\keyword{internal} diff --git a/man/rADRS.Rd b/man/rADRS.Rd deleted file mode 100644 index b25c9988..00000000 --- a/man/rADRS.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{rADRS} -\alias{rADRS} -\title{Random response} -\format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 3200 rows and 65 columns. -} -\source{ -internal -} -\usage{ -rADRS -} -\description{ -Random response -} -\keyword{datasets} -\keyword{internal} diff --git a/man/rADSL.Rd b/man/rADSL.Rd deleted file mode 100644 index 1b09ee22..00000000 --- a/man/rADSL.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{rADSL} -\alias{rADSL} -\title{Random patient listing} -\format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 400 rows and 55 columns. -} -\source{ -internal -} -\usage{ -rADSL -} -\description{ -Random patient listing -} -\keyword{datasets} -\keyword{internal} diff --git a/man/rADTTE.Rd b/man/rADTTE.Rd deleted file mode 100644 index 185d391d..00000000 --- a/man/rADTTE.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{rADTTE} -\alias{rADTTE} -\title{Random time to event analysis dataset} -\format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 2000 rows and 67 columns. -} -\source{ -internal -} -\usage{ -rADTTE -} -\description{ -Random time to event analysis dataset -} -\keyword{datasets} -\keyword{internal} diff --git a/man/resolve_delayed.Rd b/man/resolve_delayed.Rd index 25d0444c..41996186 100644 --- a/man/resolve_delayed.Rd +++ b/man/resolve_delayed.Rd @@ -40,7 +40,7 @@ Resolved object. \examples{ library(shiny) -ADSL <- rADSL +ADSL <- teal.data::rADSL isolate({ data_list <- list(ADSL = reactive(ADSL)) diff --git a/man/value_choices.Rd b/man/value_choices.Rd index 40286919..dc4e93d0 100644 --- a/man/value_choices.Rd +++ b/man/value_choices.Rd @@ -39,7 +39,7 @@ named character vector or \code{delayed_data} object. Wrapper on \link{choices_labeled} to label variable values basing on other variable values. } \examples{ -ADRS <- rADRS +ADRS <- teal.data::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"), diff --git a/man/variable_choices.Rd b/man/variable_choices.Rd index b69b069b..40a9f76b 100644 --- a/man/variable_choices.Rd +++ b/man/variable_choices.Rd @@ -44,7 +44,6 @@ Wrapper on \link{choices_labeled} to label variables basing on existing labels i } \examples{ library(teal.data) - ADRS <- rADRS variable_choices(ADRS) variable_choices(ADRS, subset = c("PARAM", "PARAMCD")) diff --git a/tests/testthat/test-data_extract_module.R b/tests/testthat/test-data_extract_module.R index 55df2e99..430b9ccd 100644 --- a/tests/testthat/test-data_extract_module.R +++ b/tests/testthat/test-data_extract_module.R @@ -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( diff --git a/tests/testthat/test-data_extract_multiple_srv.R b/tests/testthat/test-data_extract_multiple_srv.R index 6d3bcca1..dfe9b4a2 100644 --- a/tests/testthat/test-data_extract_multiple_srv.R +++ b/tests/testthat/test-data_extract_multiple_srv.R @@ -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")] diff --git a/tests/testthat/test-data_extract_spec.R b/tests/testthat/test-data_extract_spec.R index b3c05043..04ae26a8 100644 --- a/tests/testthat/test-data_extract_spec.R +++ b/tests/testthat/test-data_extract_spec.R @@ -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")) diff --git a/tests/testthat/test-data_extract_srv.R b/tests/testthat/test-data_extract_srv.R index 433e1905..0f908971 100644 --- a/tests/testthat/test-data_extract_srv.R +++ b/tests/testthat/test-data_extract_srv.R @@ -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")] diff --git a/tests/testthat/test-delayed_data_extract.R b/tests/testthat/test-delayed_data_extract.R index b0751256..53afd032 100644 --- a/tests/testthat/test-delayed_data_extract.R +++ b/tests/testthat/test-delayed_data_extract.R @@ -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")] diff --git a/tests/testthat/test-filter_spec.R b/tests/testthat/test-filter_spec.R index 628ac844..6667c167 100644 --- a/tests/testthat/test-filter_spec.R +++ b/tests/testthat/test-filter_spec.R @@ -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]]) @@ -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) diff --git a/tests/testthat/test-resolve.R b/tests/testthat/test-resolve.R index 73ca5627..8acd3b8f 100644 --- a/tests/testthat/test-resolve.R +++ b/tests/testthat/test-resolve.R @@ -1,5 +1,5 @@ -ADSL <- rADSL -ADTTE <- rADTTE +ADSL <- teal.data::rADSL +ADTTE <- teal.data::rADTTE arm_ref_comp <- list( ARMCD = list( diff --git a/tests/testthat/test-resolve_delayed.R b/tests/testthat/test-resolve_delayed.R index 27108e28..b1789eee 100644 --- a/tests/testthat/test-resolve_delayed.R +++ b/tests/testthat/test-resolve_delayed.R @@ -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")] diff --git a/tests/testthat/test-select_spec.R b/tests/testthat/test-select_spec.R index d3d99aa8..16d0c812 100644 --- a/tests/testthat/test-select_spec.R +++ b/tests/testthat/test-select_spec.R @@ -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")) diff --git a/tests/testthat/test-value_choices.R b/tests/testthat/test-value_choices.R index 411ec9ae..c16266bc 100644 --- a/tests/testthat/test-value_choices.R +++ b/tests/testthat/test-value_choices.R @@ -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")) diff --git a/tests/testthat/test-variable_choices.R b/tests/testthat/test-variable_choices.R index df681046..f1dddb33 100644 --- a/tests/testthat/test-variable_choices.R +++ b/tests/testthat/test-variable_choices.R @@ -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")) diff --git a/vignettes/data-extract-merge.Rmd b/vignettes/data-extract-merge.Rmd index 0b00971b..67122847 100644 --- a/vignettes/data-extract-merge.Rmd +++ b/vignettes/data-extract-merge.Rmd @@ -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( diff --git a/vignettes/data-extract.Rmd b/vignettes/data-extract.Rmd index fc2e21f1..cbe47574 100644 --- a/vignettes/data-extract.Rmd +++ b/vignettes/data-extract.Rmd @@ -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( diff --git a/vignettes/data-merge.Rmd b/vignettes/data-merge.Rmd index 0919336c..e62b959b 100644 --- a/vignettes/data-merge.Rmd +++ b/vignettes/data-merge.Rmd @@ -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(