Skip to content

Commit 2982a47

Browse files
Closes #110 took opportunity to add AELOC to ae_ophtha
1 parent ebc445f commit 2982a47

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
- `CMENRTPT` variable was added to the `cm` dataset. (#120)
88

9+
- `AELOC` variable was added to the `ae_ophtha` dataset. (#110)
10+
911
<details>
1012
<summary>Developer Notes</summary>
1113

data-raw/ae_ophtha.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ae_ophtha <- ae
1515
## Create possible AELAT values - as collected on CRF ----
1616
lat <- c("LEFT", "RIGHT", "BOTH")
1717

18-
## Create AELAT variable ----
18+
## Create AELAT, AELOC variable ----
1919
# Use random assignment of lat values where AESOC is "EYE DISORDERS"
2020
# Set seed so that result stays the same for each run
2121
set.seed(1)
@@ -26,7 +26,11 @@ ae_ophtha$AELAT <- if_else(ae_ophtha$AESOC == "EYE DISORDERS",
2626
)
2727

2828
ae_ophtha <- ae_ophtha %>%
29-
add_labels(AELAT = "Laterality")
29+
mutate(AELOC = if_else(AESOC == "EYE DISORDERS", "EYE", NA_character_))
30+
31+
ae_ophtha <- ae_ophtha %>%
32+
add_labels(AELAT = "Laterality") %>%
33+
add_labels(AELOC = "Location")
3034

3135
# Label dataset ----
3236
attr(ae_ophtha, "label") <- "Adverse Events"

data/ae_ophtha.rda

95 Bytes
Binary file not shown.

man/ae_ophtha.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)