Conversation
jwildfire
requested changes
Jan 27, 2023
| getDefaultSettings <- function(standard) { | ||
| settings <- list() | ||
|
|
||
| if (standard == 'sdtm') { |
Contributor
There was a problem hiding this comment.
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
Comment on lines
37
to
61
| ## 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') |
Contributor
There was a problem hiding this comment.
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.
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.