From ba0ecbac5879fb79f6c622df272d7b728f221cc7 Mon Sep 17 00:00:00 2001 From: Md Aminul Islam Prodhan Date: Sun, 15 Dec 2024 08:56:51 -0600 Subject: [PATCH] mi edited --- R/get_liver_om_lb_mi_tox_score_list.R | 8 +++--- inst/test_get_liver_om_lb_mi_score_list.R | 32 +++++++++++------------ inst/test_get_mi_score.R | 4 +-- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/R/get_liver_om_lb_mi_tox_score_list.R b/R/get_liver_om_lb_mi_tox_score_list.R index c866b3c..6eef00a 100644 --- a/R/get_liver_om_lb_mi_tox_score_list.R +++ b/R/get_liver_om_lb_mi_tox_score_list.R @@ -1,7 +1,7 @@ #' @title get_liver_om_lb_mi_tox_score_list -#' @param selected_studies Mandatory, character \cr +#' @param studyid_or_studyids Mandatory, character \cr #' Studyid number #' @param path_db Mandatory, character \cr #' path of database @@ -25,7 +25,7 @@ -get_liver_om_lb_mi_tox_score_list <- function (selected_studies, +get_liver_om_lb_mi_tox_score_list <- function (studyid_or_studyids = FALSE, path_db, fake_study = FALSE, use_xpt_file = FALSE, @@ -113,8 +113,8 @@ if(output_individual_scores ) { #--------------------------------------------------------------------------- # iterate over studyid or each xpt folder -for (studyid in selected_studies){ - +#for (studyid in selected_studies){ +for (studyid in studyid_or_studyids ){ print(studyid) if( multiple_xpt_folder == TRUE) { diff --git a/inst/test_get_liver_om_lb_mi_score_list.R b/inst/test_get_liver_om_lb_mi_score_list.R index bfd664b..09e6062 100644 --- a/inst/test_get_liver_om_lb_mi_score_list.R +++ b/inst/test_get_liver_om_lb_mi_score_list.R @@ -9,27 +9,27 @@ devtools::load_all(".") path_db='C:/Users/MdAminulIsla.Prodhan/OneDrive - FDA/Documents/DATABASES/TestDB.db' -#selected_studies <- c("2170016") +studyid_or_studyids <- c("2170016", "876") - - -R_SQL_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies, - path_db = path_db, - fake_study = FALSE, - use_xpt_file = FALSE, - multiple_xpt_folder = FALSE, - output_individual_scores = FALSE, - output_zscore_by_USUBJID = FALSE) +R_SQL_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list(studyid_or_studyids = studyid_or_studyids, + path_db = path_db, + fake_study = FALSE, + use_xpt_file = FALSE, + multiple_xpt_folder = FALSE, + output_individual_scores = FALSE, + output_zscore_by_USUBJID = FALSE) # For multiple xpt folder +rm(list = ls()) +devtools::load_all(".") +path_db='C:/Users/MdAminulIsla.Prodhan/OneDrive - FDA/Documents/DATABASES/real_xpt_dir' +studyid_or_studyids <- list.dirs(path_db , full.names = TRUE, recursive = FALSE) -selected_studies <- list.dirs(path_db , full.names = TRUE, recursive = FALSE) - -R_XPT_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies, - path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/real_xpt_dir/IND051292_1017-3581', +R_XPT_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (studyid_or_studyids = studyid_or_studyids, + path_db = path_db, fake_study = FALSE, - use_xpt_file = FALSE, - multiple_xpt_folder = FALSE, + use_xpt_file = TRUE, + multiple_xpt_folder = TRUE, output_individual_scores = FALSE, output_zscore_by_USUBJID = FALSE) diff --git a/inst/test_get_mi_score.R b/inst/test_get_mi_score.R index 7bb11e0..40fdedd 100644 --- a/inst/test_get_mi_score.R +++ b/inst/test_get_mi_score.R @@ -22,8 +22,8 @@ fake_T_xpt_T_mi_score = get_mi_score(studyid=NULL, -real_sqlite_mi_score <- get_mi_score(studyid="5003635", - path_db="C:/Users/MdAminulIsla.Prodhan/OneDrive - FDA/Documents/TestDB.db", +real_sqlite_mi_score <- get_mi_score(studyid="876", + path_db="C:/Users/MdAminulIsla.Prodhan/OneDrive - FDA/Documents/DATABASES/TestDB.db", fake_study=FALSE, use_xpt_file=FALSE, master_compiledata=NULL,