Skip to content

Commit

Permalink
Closes #110 took opportunity to add AELOC to ae_ophtha
Browse files Browse the repository at this point in the history
  • Loading branch information
manciniedoardo committed Oct 25, 2024
1 parent ebc445f commit 2982a47
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

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

- `AELOC` variable was added to the `ae_ophtha` dataset. (#110)

<details>
<summary>Developer Notes</summary>

Expand Down
8 changes: 6 additions & 2 deletions data-raw/ae_ophtha.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ae_ophtha <- ae
## Create possible AELAT values - as collected on CRF ----
lat <- c("LEFT", "RIGHT", "BOTH")

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

ae_ophtha <- ae_ophtha %>%
add_labels(AELAT = "Laterality")
mutate(AELOC = if_else(AESOC == "EYE DISORDERS", "EYE", NA_character_))

ae_ophtha <- ae_ophtha %>%
add_labels(AELAT = "Laterality") %>%
add_labels(AELOC = "Location")

# Label dataset ----
attr(ae_ophtha, "label") <- "Adverse Events"
Expand Down
Binary file modified data/ae_ophtha.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/ae_ophtha.Rd

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

0 comments on commit 2982a47

Please sign in to comment.