-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…word) is in much better shape now. Moving on to the second paper shortly.
- Loading branch information
1 parent
177a811
commit 8bc4650
Showing
8 changed files
with
145 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#' @title Opioid Use by Study Day for Example CTN-0094 Participants | ||
#' | ||
#' @description This data set is a table with daily positive opioid use | ||
#' indicator for 10 participants from the CTN-0094 harmonized data sets. This | ||
#' subset is to be used as an example of timeline-style opioid use data. | ||
#' | ||
#' @details This data is created in the script | ||
#' `inst/scripts/create_allDrugs_opioid_subset_20220916.R`. The "when" column | ||
#' measures the number of days after signed consent for the participant that | ||
#' the opioid-positive urine screen was collected. | ||
#' | ||
#' @docType data | ||
#' | ||
#' @usage data(egOpioidsCTN0094) | ||
#' | ||
#' @format A tibble with `r scales::comma(nrow(egOpioidsCTN0094))` rows and | ||
#' `r ncol(egOpioidsCTN0094)` columns. These columns include | ||
#' \describe{ | ||
#' \item{who}{Patient ID} | ||
#' \item{what}{A factor indicating what substance(s) were present in the | ||
#' urine on day `when`; trivially, all substances are "opioids" for this | ||
#' example data.} | ||
#' \item{when}{The number of days since signed study consent} | ||
#' } | ||
"egOpioidsCTN0094" |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Excerpt of all_drugs for 10 example participants | ||
# Gabriel Odom | ||
# 2022-09-16 | ||
|
||
library(ctn0094data) | ||
library(ctn0094DataExtra) | ||
library(tidyverse) | ||
|
||
interestingPeople_int <- c( | ||
163L, 210L, 242L, 4L, 17L, 13L, 1103L, 33L, 233L, 2089L | ||
) | ||
|
||
egOpioidsCTN0094 <- | ||
all_drugs %>% | ||
filter(who %in% interestingPeople_int) %>% | ||
filter(source %in% c("UDS", "UDSAB")) %>% | ||
filter(what == "Opioid") %>% | ||
select(-source) %>% | ||
distinct() %>% | ||
arrange(who, when) | ||
|
||
usethis::use_data(egOpioidsCTN0094) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.