Skip to content

Commit

Permalink
try to harmonize the templates (#496)
Browse files Browse the repository at this point in the history
following #476, I tried to make the templates a bit clearer. something
added

1. for aet01_aesi and aet01 template, remove the check functions in pre.
all these derivations are executed without check! as users are
responsible for these derivations and they are clear. more checks added
in `main` functions
    1. check the arm variable are identical in levels (in adsl and adae)
    2. check variables to analyze exists (especially those new derived)
3. remove `deco`. titles/footnotes should be handled in citril using
lopo
1. remove aet01_2. this can be handled through arguments of aet01
1. for aet02 template, variants are removed. can be achieved through
argument `row_split_var`
2. add many utility functions (currently put in aet02.R but should go
into utility.R)
    3. valid_row_path. this checks if a row_path is valid for a table
4. valid_sort_at_path. this conduct the sort based on `row_path` if it
is valid. (sort_at_path gives error on incorrect row_path provided, and
aet02_1 previously will run into issues if prune_0 = FALSE on empty
data)
5. get_sort_path. this function will create "*" between variables, e.g,
`get_sort_path(c("A","B"))` will give "A" "*" "B", this is required by
`sort_at_path`
6. tlg_sort_by_var. this functions will sort using "A" and "B", instead
of "A" "*" "B". Also will check if the table contains the path. if does
not contain the path, the sorting will be ignored.

I think some of the funcitonality should go into tern/rtables. But for
now let's use them.

Please review this update in general and I will finalize this PR if no
objections. Then everyone can collaborate to harmonize all templates.

@Teninq @BFalquet @duanx9 @crazycatandy @barnett11

---------

Signed-off-by: b_falquet <[email protected]>
Co-authored-by: benoit <[email protected]>
Co-authored-by: b_falquet <[email protected]>
  • Loading branch information
3 people authored May 17, 2023
1 parent 73bc45e commit 5af2c1f
Show file tree
Hide file tree
Showing 226 changed files with 8,589 additions and 12,177 deletions.
17 changes: 10 additions & 7 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
^\.pre-commit-config\.yaml$
^data-raw
^temp$
^.github$
^staged_dependencies.yaml$
_pkgdown.yaml
^\.github$
^staged_dependencies\.yaml$
_pkgdown\.yaml
docs
^.lintr
^.gitlab-ci.yml
CODE_OF_CONDUCT.md
SECURITY.md
^\.lintr
^\.gitlab-ci\.yml
CODE_OF_CONDUCT\.md
SECURITY\.md
^doc$
^Meta$
^\.vscode$
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ temp
.Renviron
.Rprofile
.vscode
doc/
Meta/
*pdf
8 changes: 7 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ Imports:
magrittr,
methods,
nestcolor (>= 0.1.1),
purrr,
stringr,
rlang,
rlistings (>= 0.2.1),
rtables (>= 0.6.0),
tern (>= 0.8.1),
tibble
tibble,
utils
Suggests:
knitr,
rmarkdown,
Expand Down Expand Up @@ -92,7 +95,10 @@ Collate:
'package.R'
'pdt01.R'
'pdt02.R'
'reexports.R'
'rmpt01.R'
'rspt01.R'
'rtables_utils.R'
'standard_rules.R'
'vst01.R'
'vst02.R'
Loading

0 comments on commit 5af2c1f

Please sign in to comment.