Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to harmonize the templates (#496)
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