You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: sdtmchecks::run_check() does not appear to work with dummy data only for AE
To run properly, "ae" dataset must be populated. Most other checks require "AE" be populated.
suspect code? in line containing parse
## fxn_in="AE=ae"
## parse(text = paste0(check, "(", fxn_in, ")"))
library(sdtmchecks)
### Pick a check (check_ae_aeacnoth):
metads = sdtmchecksmeta[sdtmchecksmeta$check == "check_ae_aeacnoth", ]
metads$check
#> [1] "check_ae_aeacnoth"
### Populate dummy AE
### "Assuming sdtm datasets are in your global environment"
AE <- data.frame(
USUBJID = 1:7,
AETERM = 1:7,
AESTDTC = 1:7,
AEACNOTH = 1:7,
AEACNOT1 = 1:7,
AEACNOT2 = 1:7,
AESPID = "FORMNAME-R:13/L:13XXXX"
)
### check: pass
check_ae_aeacnoth(AE)
#> [1] TRUE
rec1$notes
#> [1] "ATTENTION! Check was not run: AE does not exist or failed to read"
rec2$notes
#> [1] " "
rec1
#> $xls_title
#> [1] "AE AEACNOTH multiple"
#>
#> $pdf_title
#> [1] "Check for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE'"
#>
#> $pdf_subtitle
#> [1] "* This check looks for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE', which indicates a possible SDTMv mapping issue\n* NOTE: not all ongoing studies are adopting this approach for AE resolution and this may not be appropriate to query"
#>
#> $nrec
#> [1] 0
#>
#> $notes
#> [1] "ATTENTION! Check was not run: AE does not exist or failed to read"
#>
#> $msg
#> character(0)
#>
#> $data
#> data frame with 0 columns and 0 rows
rec2
#> $xls_title
#> [1] "AE AEACNOTH multiple"
#>
#> $pdf_title
#> [1] "Check for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE'"
#>
#> $pdf_subtitle
#> [1] "* This check looks for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE', which indicates a possible SDTMv mapping issue\n* NOTE: not all ongoing studies are adopting this approach for AE resolution and this may not be appropriate to query"
#>
#> $nrec
#> [1] 0
#>
#> $notes
#> [1] " "
#>
#> $msg
#> character(0)
#>
#> $data
#> data frame with 0 columns and 0 rows
Created on 2024-06-19 with reprex v2.1.0
Standard output and standard error
The text was updated successfully, but these errors were encountered:
run 2 ways, (1) ae not in environment (2) ae=AE
rec1 <- run_check(
check = metads$check,
fxn_in = metads$fxn_in,
xls_title = metads$xls_title,
pdf_title = metads$pdf_title,
pdf_subtitle = metads$pdf_subtitle,
pdf_return = metads$pdf_return,
verbose = T
)
ae=AE
rec2 <- run_check(
check = metads$check,
fxn_in = metads$fxn_in,
xls_title = metads$xls_title,
pdf_title = metads$pdf_title,
pdf_subtitle = metads$pdf_subtitle,
pdf_return = metads$pdf_return,
verbose = T
)
identical(rec1, rec2)
#> [1] FALSE
rec1$notes
#> [1] "ATTENTION! Check was not run: AE does not exist or failed to read"
rec2$notes
#> [1] " "
rec1
#> $xls_title
#> [1] "AE AEACNOTH multiple"
#>
#> $pdf_title
#> [1] "Check for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE'"
#>
#> $pdf_subtitle
#> [1] "* This check looks for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE', which indicates a possible SDTMv mapping issue\n* NOTE: not all ongoing studies are adopting this approach for AE resolution and this may not be appropriate to query"
#>
#> $nrec
#> [1] 0
#>
#> $notes
#> [1] "ATTENTION! Check was not run: AE does not exist or failed to read"
#>
#> $msg
#> character(0)
#>
#> $data
#> data frame with 0 columns and 0 rows
rec2
#> $xls_title
#> [1] "AE AEACNOTH multiple"
#>
#> $pdf_title
#> [1] "Check for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE'"
#>
#> $pdf_subtitle
#> [1] "* This check looks for null AEACNOT[1/2] when AEACNOTH = 'MULTIPLE', which indicates a possible SDTMv mapping issue\n* NOTE: not all ongoing studies are adopting this approach for AE resolution and this may not be appropriate to query"
#>
#> $nrec
#> [1] 0
#>
#> $notes
#> [1] " "
#>
#> $msg
#> character(0)
#>
#> $data
#> data frame with 0 columns and 0 rows
Created on 2024-06-19 with reprex v2.1.0
Standard output and standard error
The text was updated successfully, but these errors were encountered: