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

Update ARM and ACTARM. #317

Merged
merged 6 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions R/radab.R
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ radab <- function(adsl,
last_ada
))

# Carry over ARM and ACTARM for all records.
arm <- adab %>%
filter(!is.na(ARM), !is.na(ACTARM)) %>%
select(USUBJID, ARM, ACTARM) %>%
distinct(.)
adab$ARM <- arm$ARM[match(adab$USUBJID, arm$USUBJID)]
adab$ACTARM <- arm$ACTARM[match(adab$USUBJID, arm$USUBJID)]

if (length(na_vars) > 0 && na_percentage > 0) {
adab <- mutate_na(ds = adab, na_vars = na_vars, na_percentage = na_percentage)
}
Expand Down
Binary file modified data/cadab.RData
Binary file not shown.
50 changes: 25 additions & 25 deletions tests/testthat/_snaps/row_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -4698,24 +4698,24 @@
6 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X 24H 1.08
7 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X Predose 1
8 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X 24H 1
9 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
10 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
11 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
12 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
13 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
14 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
15 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
16 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
17 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
18 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
19 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
20 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
21 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
22 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
23 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
24 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
25 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0
26 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 0.143
9 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
10 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
11 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
12 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
13 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
14 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
15 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
16 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
17 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
18 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
19 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
20 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
21 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
22 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
23 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
24 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
25 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0
26 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 0.143
AVALC AVALU
<chr> <fct>
1 POSITIVE "titer"
Expand Down Expand Up @@ -4837,16 +4837,16 @@
# A tibble: 10 x 21
STUDYID USUBJID ARM ACTARM ISTPT AVAL
<chr> <chr> <fct> <fct> <fct> <dbl>
1 AB12345 AB12345-USA-13-id-3 <NA> <NA> <NA> 0
1 AB12345 AB12345-USA-13-id-3 A: Drug X A: Drug X <NA> 0
2 AB12345 AB12345-CHN-3-id-5 A: Drug X A: Drug X 24H NA
3 AB12345 AB12345-BRA-9-id-8 <NA> <NA> <NA> 1
3 AB12345 AB12345-BRA-9-id-8 A: Drug X A: Drug X <NA> 1
4 AB12345 AB12345-CHN-11-id-1 C: Combination C: Combination 24H NA
5 AB12345 AB12345-BRA-9-id-8 <NA> <NA> <NA> 0
5 AB12345 AB12345-BRA-9-id-8 A: Drug X A: Drug X <NA> 0
6 AB12345 AB12345-CHN-3-id-5 A: Drug X A: Drug X Predose 1
7 AB12345 AB12345-BRA-1-id-9 <NA> <NA> <NA> 0.143
8 AB12345 AB12345-CHN-11-id-1 <NA> <NA> <NA> 0
9 AB12345 AB12345-USA-13-id-3 <NA> <NA> <NA> 1
10 AB12345 AB12345-JPN-4-id-7 <NA> <NA> <NA> 1
7 AB12345 AB12345-BRA-1-id-9 C: Combination C: Combination <NA> 0.143
8 AB12345 AB12345-CHN-11-id-1 C: Combination C: Combination <NA> 0
9 AB12345 AB12345-USA-13-id-3 A: Drug X A: Drug X <NA> 1
10 AB12345 AB12345-JPN-4-id-7 A: Drug X A: Drug X <NA> 1
AVALC AVALU PARAM
<chr> <fct> <fct>
1 N "" Treatment enhanced ADA, Neutralizing Antibody
Expand Down
Loading