-
Notifications
You must be signed in to change notification settings - Fork 1
Calculate study timing given sdtm data.
#14
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
base: main
Are you sure you want to change the base?
Conversation
| getDefaultSettings <- function(standard) { | ||
| settings <- list() | ||
|
|
||
| if (standard == 'sdtm') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be able to use safetyGraphics::makeMapping to do this. Let me see if i can get it working.
R/profileApp.R
Outdated
| ## Calculate study timing. | ||
| if (standard == 'sdtm') { | ||
| data$aes <- getTiming( | ||
| params = list( | ||
| data = data, | ||
| settings = settings, | ||
| standard = standard | ||
| ), | ||
| 'aes', | ||
| domainStartDate = settings$aes$stdt_col, | ||
| domainEndDate = settings$aes$endt_col | ||
| ) | ||
| settings$aes$stdy_col <- paste0(settings$aes$stdt_col, '_dy') | ||
| settings$aes$endy_col <- paste0(settings$aes$endt_col, '_dy') | ||
|
|
||
| data$labs <- getTiming( | ||
| params = list( | ||
| data = data, | ||
| settings = settings, | ||
| standard = standard | ||
| ), | ||
| 'labs', | ||
| domainDate = settings$labs$dt_col | ||
| ) | ||
| settings$labs$dy_col <- paste0(settings$labs$dt_col, '_dy') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should treat this more like a utility function. Let's move this to a separate function (getSDTMTiming) and have the user call it before starting the app. That way we can use the day variable in other safetyGraphics modules as well if needed. Something like:
sdtm <- getDefaultData(standard="sdtm") %>% getSDTMTiming
safetyGraphicsApp(data=sdtm)
# or profileApp(data=sdtm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 4 out of 13 changed files in this pull request and generated no comments.
Files not reviewed (9)
- DESCRIPTION: Language not supported
- R/getDefaultData.R: Language not supported
- R/getDefaultSettings.R: Language not supported
- R/getSDTMTiming.R: Language not supported
- R/getTiming.R: Language not supported
- R/profileApp.R: Language not supported
- data-raw/mapping.R: Language not supported
- data-raw/mapping_adam.csv: Language not supported
- data-raw/mapping_sdtm.csv: Language not supported
No description provided.