8000 Fix 635 - Add country to grouping by mattroumaya · Pull Request #803 · Gilead-BioStats/gsm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix 635 - Add country to grouping #803

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

Merged
merged 5 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/AE_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ AE_Assess <- function(dfInput,
stopifnot(
"strMethod is not 'poisson' or 'identity'" = strMethod %in% c("poisson", "identity"),
"strMethod must be length 1" = length(strMethod) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/AE_Map_Adam.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ AE_Map_Adam <- function(
any_of(c(
SiteID = lMapping[["dfADSL"]][["strSiteCol"]],
StudyID = lMapping[["dfADSL"]][["strStudyCol"]],
CountryID = lMapping[["dfADSL"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfADSL"]][["strCustomGroupCol"]]
)),
"Count",
Expand Down
1 change: 1 addition & 0 deletions R/AE_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ AE_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]< EDBE /span>
)
),
Expand Down
2 changes: 1 addition & 1 deletion R/Consent_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Consent_Assess <- function(
stopifnot(
"nThreshold must be numeric" = is.numeric(nThreshold),
"nThreshold must be length 1" = length(nThreshold) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/Consent_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Consent_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]
)
),
Expand Down
2 changes: 1 addition & 1 deletion R/Disp_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Disp_Assess <- function(
stopifnot(
"strMethod is not 'fisher' or 'identity'" = strMethod %in% c("fisher", "identity"),
"strMethod must be length 1" = length(strMethod) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/Disp_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Disp_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]
)
)
Expand Down
2 changes: 1 addition & 1 deletion R/IE_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ IE_Assess <- function(
stopifnot(
"nThreshold must be numeric" = is.numeric(nThreshold),
"nThreshold must be length 1" = length(nThreshold) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/IE_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ IE_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
10000 StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]
)
)
Expand Down
2 changes: 1 addition & 1 deletion R/LB_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ LB_Assess <- function(
stopifnot(
"strMethod is not 'fisher' or 'identity'" = strMethod %in% c("fisher", "identity"),
"strMethod must be length 1" = length(strMethod) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/LB_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ LB_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]
)
)
Expand Down
2 changes: 1 addition & 1 deletion R/PD_Assess.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ PD_Assess <- function(
stopifnot(
"strMethod is not 'poisson' or 'identity'" = strMethod %in% c("poisson", "identity"),
"strMethod must be length 1" = length(strMethod) == 1,
"strGroup must be one of: Site, Study, or CustomGroup" = strGroup %in% c("Site", "Study", "CustomGroup"),
"strGroup must be one of: Site, Study, Country, or CustomGroup" = strGroup %in% c("Site", "Study", "Country", "CustomGroup"),
"bQuiet must be logical" = is.logical(bQuiet)
)

Expand Down
1 change: 1 addition & 0 deletions R/PD_Map_Raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ PD_Map_Raw <- function(
c(
SiteID = lMapping[["dfSUBJ"]][["strSiteCol"]],
StudyID = lMapping[["dfSUBJ"]][["strStudyCol"]],
CountryID = lMapping[["dfSUBJ"]][["strCountryCol"]],
CustomGroupID = lMapping[["dfSUBJ"]][["strCustomGroupCol"]]
)
),
Expand Down
1 change: 1 addition & 0 deletions inst/mappings/AE_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dfInput:
strIDCol: "SubjectID"
strSiteCol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strCountCol: "Count"
strExposureCol: "Exposure"
Expand Down
1 change: 1 addition & 0 deletions inst/mappings/Consent_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dfInput:
strIDCol: "SubjectID"
strSiteC 4D32 ol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strRandDateCol: "RandDate"
strCountCol: "Count"
Expand Down
1 change: 1 addition & 0 deletions inst/mappings/Disp_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dfInput:
strIDCol: "SubjectID"
strSiteCol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strCountCol: "Count"
strTotalCol: "Total"
1 change: 1 addition & 0 deletions inst/mappings/IE_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ dfInput:
strIDCol: "SubjectID"
strSiteCol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strCountCol: "Count"
1 change: 1 addition & 0 deletions inst/mappings/LB_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dfInput:
strIDCol: "SubjectID"
strSiteCol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strCountCol: "Count"
strTotalCol: "Total"
1 change: 1 addition & 0 deletions 1 inst/mappings/PD_Assess.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ dfInput:
strIDCol: "SubjectID"
strSiteCol: "SiteID"
strStudyCol: "StudyID"
strCountryCol: "CountryID"
strCustomGroupCol: "CustomGroupID"
strCountCol: "Count"
strExposureCol: "Exposure"
Expand Down
3 changes: 2 additions & 1 deletion inst/mappings/mapping_rawplus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ dfSUBJ:
strTimeOnStudyCol: timeonstudy
strTimeOnTreatmentCol: timeontreatment
strRandDateCol: rfpst_dt
strCustomGroupCol: country
strCustomGroupCol: invid
strCountryCol: country
dfAE:
strIDCol: subjid
strTreatmentEmergentCol: ae_te
Expand Down
19 changes: 17 additions & 2 deletions tests/testthat/_snaps/AE_Assess.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
---

Code
subsetGroupCols(customGroup)
subsetGroupCols(country)
Output
# A tibble: 3 x 1
GroupID
Expand All @@ -32,6 +32,18 @@
2 US
3 Japan

---

Code
subsetGroupCols(customGroup)
Output
# A tibble: 3 x 1
GroupID
<chr>
1 0X201
2 0X012
3 0X999

# incorrect inputs throw errors

strMethod is not 'poisson' or 'identity'
Expand Down Expand Up @@ -145,7 +157,7 @@


$lChecks$dfInput$dim
[1] 3 7
[1] 3 8


$lChecks$status
Expand All @@ -162,6 +174,9 @@
$lChecks$mapping$dfInput$strStudyCol
[1] "StudyID"

$lChecks$mapping$dfInput$strCountryCol
[1] "CountryID"

$lChecks$mapping$dfInput$strCustomGroupCol
[1] "CustomGroupID"

Expand Down
14 changes: 12 additions & 2 deletions tests/testthat/_snaps/AE_Map_Raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol"]
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol", "strCountryCol"]
}
},
"value": [
Expand Down Expand Up @@ -156,6 +156,11 @@
"attributes": {},
"value": ["rfpst_dt"]
},
{
"type": "character",
"attributes": {},
"value": ["invid"]
},
{
"type": "character",
"attributes": {},
Expand Down Expand Up @@ -226,7 +231,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCustomGroupCol", "strCountCol", "strExposureCol", "strRateCol"]
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCountryCol", "strCustomGroupCol", "strCountCol", "strExposureCol", "strRateCol"]
}
},
"value": [
Expand All @@ -245,6 +250,11 @@
"attributes": {},
"value": ["StudyID"]
},
{
"type": "character",
"attributes": {},
"value": ["CountryID"]
},
{
"type": "character",
"attributes": {},
Expand Down
14 changes: 13 additions & 1 deletion tests/testthat/_snaps/Consent_Assess.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
---

Code
subsetGroupCols(customGroup)
subsetGroupCols(country)
Output
# A tibble: 3 x 1
GroupID
Expand All @@ -32,6 +32,18 @@
2 China
3 Japan

---

Code
subsetGroupCols(customGroup)
Output
# A tibble: 3 x 1
GroupID
<chr>
1 0X012
2 0X201
3 0X999

# bQuiet works as intended

Code
Expand Down
14 changes: 12 additions & 2 deletions tests/testthat/_snaps/Consent_Map_Raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol"]
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol", "strCountryCol"]
}
},
"value": [
Expand Down Expand Up @@ -151,6 +151,11 @@
"attributes": {},
"value": ["rfpst_dt"]
},
{
"type": "character",
"attributes": {},
"value": ["invid"]
},
{
"type": "character",
"attributes": {},
Expand Down Expand Up @@ -216,7 +221,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCustomGroupCol", "strRandDateCol", "strCountCol"]
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCountryCol", "strCustomGroupCol", "strRandDateCol", "strCountCol"]
}
},
"value": [
Expand All @@ -235,6 +240,11 @@
"attributes": {},
"value": ["StudyID"]
},
{
"type": "character",
"attributes": {},
"value": ["CountryID"]
},
{
"type": "character",
"attributes": {},
Expand Down
14 changes: 13 additions & 1 deletion tests/testthat/_snaps/Disp_Assess.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
---

Code
subsetGroupCols(customGroup)
subsetGroupCols(country)
Output
# A tibble: 3 x 1
GroupID
Expand All @@ -22,6 +22,18 @@
2 Japan
3 US

---

Code
subsetGroupCols(customGroup)
Output
# A tibble: 3 x 1
GroupID
<chr>
1 0X201
2 0X012
3 0X999

# incorrect inputs throw errors

strMethod is not 'fisher' or 'identity'
Expand Down
14 changes: 12 additions & 2 deletions tests/testthat/_snaps/Disp_Map_Raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol"]
"value": ["strStudyCol", "strSiteCol", "strIDCol", "strTimeOnStudyCol", "strTimeOnTreatmentCol", "strRandDateCol", "strCustomGroupCol", "strCountryCol"]
}
},
"value": [
Expand Down Expand Up @@ -146,6 +146,11 @@
"attributes": {},
"value": ["rfpst_dt"]
},
{
"type": "character",
"attributes": {},
"value": ["invid"]
},
{
"type": "character",
"attributes": {},
Expand Down Expand Up @@ -211,7 +216,7 @@
"names": {
"type": "character",
"attributes": {},
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCustomGroupCol", "strCountCol", "strTotalCol"]
"value": ["strIDCol", "strSiteCol", "strStudyCol", "strCountryCol", "strCustomGroupCol", "strCountCol", "strTotalCol"]
}
},
"value": [
Expand All @@ -230,6 +235,11 @@
"attributes": {},
"value": ["StudyID"]
},
{
"type": "character",
"attributes": {},
"value": ["CountryID"]
},
{
"type": "character",
"attributes": {},
Expand Down
Loading
0