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

Create minimal test data for examples and initialize the substitution #721

Merged
merged 28 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4b1c6f0
fix one example
Melkiades Feb 17, 2023
612bfff
initial trials
Melkiades Feb 17, 2023
d7b78d9
Merge branch 'main' into 708_examples_noSCDA@main
Melkiades Feb 20, 2023
3a7db0a
init for the data
Melkiades Feb 20, 2023
fbf06fd
Merge branch '708_examples_noSCDA@main' of github.com:insightsenginee…
Melkiades Feb 20, 2023
6b2bf3f
adding generated data
Melkiades Feb 20, 2023
b1a203a
Now this works with internal data
Melkiades Feb 20, 2023
53f2fe3
[skip actions] Roxygen Man Pages Auto Update
dependabot-preview[bot] Feb 20, 2023
418c034
Merge branch 'main' into 708_examples_noSCDA@main
Melkiades Feb 21, 2023
5645fc3
fixing var labels
Melkiades Feb 21, 2023
f3c3d8e
A merge
Melkiades Feb 21, 2023
de64f9f
adding a column
Melkiades Feb 21, 2023
460c9f3
adding data to pkgdown
Melkiades Feb 21, 2023
ff98d9c
additions and fixes
Melkiades Feb 21, 2023
bc094e5
more example fixes
Melkiades Feb 21, 2023
0e5e84b
is it complaining for this?
Melkiades Feb 21, 2023
b9d105e
adding adcm
Melkiades Feb 21, 2023
f6dfe72
adcm final for gpp_patient_timeline
Melkiades Feb 21, 2023
f782533
styler
Melkiades Feb 21, 2023
3be3d53
ok now better?
Melkiades Feb 21, 2023
db7ae67
adding two examples and modifying adsl
Melkiades Feb 22, 2023
2f80c94
some more
Melkiades Feb 22, 2023
6840a0c
final modifications
Melkiades Feb 22, 2023
5337d7c
Merge branch 'main' into 708_examples_noSCDA@main
shajoezhu Feb 22, 2023
0096928
final fixes
Melkiades Feb 23, 2023
5d15e2c
silly spaces
Melkiades Feb 23, 2023
60e76dc
ok linter be happy plis
Melkiades Feb 23, 2023
b6778f9
news
Melkiades Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#' Simulated CDISC Data for Examples
#'
#' @format rds (data.frame)
#'
#' @name ex_data
NULL

#' @describeIn ex_data ADSL data
#'
"tmc_ex_adsl"
Melkiades marked this conversation as resolved.
Show resolved Hide resolved

#' @describeIn ex_data ADAE data
#'
"tmc_ex_adae"

#' @describeIn ex_data ADLB data
#'
"tmc_ex_adlb"

#' @describeIn ex_data ADPP data
#'
"tmc_ex_adpp"

#' @describeIn ex_data ADRS data
#'
"tmc_ex_adrs"

#' @describeIn ex_data ADTTE data
#'
"tmc_ex_adtte"
20 changes: 11 additions & 9 deletions R/tm_t_pp_laboratory.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,20 @@ template_laboratory <- function(dataname = "ANL",
#' @export
#'
#' @examples
#' library(scda)
#' ADSL <- synthetic_cdisc_dataset("latest", "adsl")
#' ADLB <- synthetic_cdisc_dataset("latest", "adlb")
#'
#' # Complete synthetic data
#' # ADSL <- scda::synthetic_cdisc_dataset("latest", "adsl")
#' # ADLB <- scda::synthetic_cdisc_dataset("latest", "adlb")
#'
#' # Reduced data from tern
#' ADSL <- tmc_ex_adsl
#' ADLB <- tmc_ex_adlb %>%
#' dplyr::mutate(ADY = ceiling(as.numeric(difftime(.data$ADTM, .data$TRTSDTM, units = "days"))))
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", ADSL,
#' code = 'ADSL <- synthetic_cdisc_dataset("latest", "adsl")'
Melkiades marked this conversation as resolved.
Show resolved Hide resolved
#' ),
#' cdisc_dataset("ADLB", ADLB,
#' code = 'ADLB <- synthetic_cdisc_dataset("latest", "adlb")'
#' )
#' cdisc_dataset("ADSL", ADSL),
#' cdisc_dataset("ADLB", ADLB)
#' ),
#' modules = modules(
#' tm_t_pp_laboratory(
Expand Down
14 changes: 5 additions & 9 deletions R/tm_t_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,10 @@ template_summary <- function(dataname,
#'
#' @export
#' @examples
#' # Preparation of the test case.
#' library(dplyr)
#' library(scda)
#' library(tern)
#'
#' adsl <- synthetic_cdisc_dataset("latest", "adsl")
#' # Preparation of the test case
#' # adsl <- scda::synthetic_cdisc_dataset("latest", "adsl") # complete data
#' adsl <- tmc_ex_adsl
#' adsl$EOSDY[1] <- NA_integer_
#'
#' # Include `EOSDY` and `DCSREAS` variables below because they contain missing data.
#' stopifnot(
Expand All @@ -234,9 +232,7 @@ template_summary <- function(dataname,
#'
#' app <- init(
#' data = cdisc_data(
#' cdisc_dataset("ADSL", adsl),
#' code = 'ADSL <- synthetic_cdisc_dataset("latest", "adsl")',
#' check = TRUE
#' cdisc_dataset("ADSL", adsl)
#' ),
#' modules = modules(
#' tm_t_summary(
Expand Down
Binary file added data/tmc_ex_adae.rda
Binary file not shown.
Binary file added data/tmc_ex_adlb.rda
Binary file not shown.
Binary file added data/tmc_ex_adpp.rda
Binary file not shown.
Binary file added data/tmc_ex_adrs.rda
Binary file not shown.
Binary file added data/tmc_ex_adsl.rda
Binary file not shown.
Binary file added data/tmc_ex_adtte.rda
Binary file not shown.
59 changes: 59 additions & 0 deletions man/ex_data.Rd

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

20 changes: 11 additions & 9 deletions man/tm_t_pp_laboratory.Rd

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

14 changes: 5 additions & 9 deletions man/tm_t_summary.Rd

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

Loading