Closed ElijT closed 1 year ago
Hi @ElijT would you be able to paste here the outcome of traceback()
after error? That would speed-up the process of identifying what was wrong in your case - most likely some outdated package but let's see.
Sure, here the outcome:
traceback() 20: stop("\n
filters = NULL
indicates that the module doesn't need any data while it has thedata
in formals.", "\nPlease specifyfilters
with the names of needed datasets or excludedata
from the arguments.") 19: module(label = label, server = srv_front_page, ui = ui_front_page, ui_args = args, server_args = list(tables = tables, show_metadata = show_metadata), filters = if (show_metadata) "all" else NULL) 18: tm_front_page(label = "Study Information", header_text = c(Info about data source
= "Random data are used that have been created with the 'scda' R package"), tables = list(NEST packages used
= data.frame(Packages = c("teal.modules.general", "teal.modules.clinical", "scda", "scda.2022")))) 17: modules(tm_front_page(label = "Study Information", header_text = c(Info about data source
= "Random data are used that have been created with the 'scda' R package"), tables = list(NEST packages used
= data.frame(Packages = c("teal.modules.general", "teal.modules.clinical", "scda", "scda.2022")))), tm_data_table("Data Table"), tm_variable_browser("Variable Browser"), tm_t_summary(label = "Demographic Table", dataname = "ADSL", arm_var = cs_arm_var, summarize_vars = choices_selected(choices = variable_choices(ADSL, demog_vars_adsl), selected = c("SEX", "AGE", "RACE"))), modules(label = "Adverse Events", tm_t_events_summary(label = "AE Summary", dataname = "ADAE", arm_var = cs_arm_var, flag_var_anl = choices_selected(choices = variable_choices("ADAE", ae_anl_vars), selected = ae_anl_vars, keep_order = TRUE), flag_var_aesi = choices_selected(choices = variable_choices("ADAE", aesi_vars), selected = aesi_vars, keep_order = TRUE), add_total = TRUE), tm_t_events(label = "AE by Term", dataname = "ADAE", arm_var = cs_arm_var, llt = choices_selected(choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD")), hlt = choices_selected(choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS"), add_total = TRUE, event_type = "adverse event"), tm_t_events_by_grade(label = "AE Table by Grade", dataname = "ADAE", arm_var = cs_arm_var, llt = choices_selected(choices = variable_choices(ADAE, c("AEDECOD")), selected = c("AEDECOD")), hlt = choices_selected(choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS"), ... 16: isTRUE(lhs) 15: .Call(c_check_list, x, any.missing, all.missing, len, min.len, max.len, unique, names, null.ok) %and% checkListTypes(x, types) 14: checkmate::check_list(modules) 13: teal::init(data = cdisc_data(cdisc_dataset("ADSL", ADSL, code = "ADSL <- synthetic_cdisc_data(\"latest\")$adsl", vars = list(char_vars_adsl = char_vars_adsl)), cdisc_dataset("ADAE", ADAE, code = ADAE_code), cdisc_dataset("ADAETTE", ADAETTE, code = ADAETTE_code), cdisc_dataset("ADEX", ADEX, code = ADEX_code), cdisc_dataset("ADLB", ADLB, code = "ADLB <- synthetic_cdisc_data(\"latest\")$adlb"), cdisc_dataset("ADEG", ADEG, code = "ADEG <- synthetic_cdisc_data(\"latest\")$adeg"), cdisc_dataset("ADVS", ADVS, code = ADVS_code), cdisc_dataset("ADCM", ADCM, code = "ADCM <- synthetic_cdisc_data(\"latest\")$adcm %>% mutate(CMSEQ = as.integer(CMSEQ))"), check = TRUE), modules = modules(tm_front_page(label = "Study Information", header_text = c(Info about data source
= "Random data are used that have been created with the 'scda' R package"), tables = list(NEST packages used
= data.frame(Packages = c("teal.modules.general", "teal.modules.clinical", "scda", "scda.2022")))), tm_data_table("Data Table"), tm_variable_browser("Variable Browser"), tm_t_summary(label = "Demographic Table", dataname = "ADSL", arm_var = cs_arm_var, summarize_vars = choices_selected(choices = variable_choices(ADSL, demog_vars_adsl), selected = c("SEX", "AGE", "RACE"))), modules(label = "Adverse Events", tm_t_events_summary(label = "AE Summary", dataname = "ADAE", arm_var = cs_arm_var, flag_var_anl = choices_selected(choices = variable_choices("ADAE", ae_anl_vars), selected = ae_anl_vars, keep_order = TRUE), flag_var_aesi = choices_selected(choices = variable_choices("ADAE", aesi_vars), selected = aesi_vars, keep_order = TRUE), ... 12: ..stacktraceon..({ options(shiny.useragg = FALSE) library(dplyr) library(scda) library(scda.2022) library(teal.modules.general) library(teal.modules.clinical) library(nestcolor) library(sparkline) ADSL <- synthetic_cdisc_data("latest")$adsl date_vars_adsl <- names(ADSL)[vapply(ADSL, function(x) { inherits(x, c("Date", "POSIXct", "POSIXlt")) }, logical(1))] char_vars_adsl <- names(Filter(isTRUE, sapply(ADSL, is.character))) ADAE <- synthetic_cdisc_data("latest")$adae ADAETTE <- synthetic_cdisc_data("latest")$adaette ADAETTE <- ADAETTE %>% mutate(is_event = case_when(grepl("TOT", .data$PARAMCD, fixed = TRUE) ~ TRUE, TRUE ~ CNSR == 0)) %>% mutate(n_events = case_when(grepl("TOT", .data$PARAMCD, fixed = TRUE) ~ as.integer(.data$AVAL), TRUE ~ as.integer(is_event))) %>% ... 11: eval(exprs, envir) 10: eval(exprs, envir) 9: sourceUTF8(fullpath, envir = new.env(parent = sharedEnv)) 8: func(fname, ...) 7: appObj() 6: shinyAppDir_appR("app.R", appDir, options = options) 5: shinyAppDir(x) 4: as.shiny.appobj.character(appDir) 3: as.shiny.appobj(appDir) 2: shiny::runApp(file.path(temp_location, app_name), ...) 1: teal.gallery::launch_app("safety")
Thanks for the support,
Some additionnal information. As error was occuring at " tm_front_page", i got the app code and deleted the corresponding module. In that case the 'app<-' code was working but when I launched the server with 'shinyApp(app$ui, app$server)' I got the following error.
Listening on http://127.0.0.1:5295
Warning: Error in
It seems that the issue is with the outdated version of teal
. Can you please pull the latest devel version - i.e. remotes::install_github("insightsengineering/teal")
and say if that helps. I will continue my investigation where to put minimal version requirement so that it won't happen in the future.
I cross check and have the latest version of teal 0.12.0. For sake of verification, I downgraded to version 0.11.0 and then it didn't work requiring an update to v0.12.0. Reupgrading lead to the initial issue...
My point here is to upgrade it to be > 0.12.0
, in particular: >= 0.12.0.9012
. You can do that installing pkg directly from GH using main
branch -> remotes::install_github("insightsengineering/teal")
or using staged.dependencies
as mentioned in the README file.
A little bit of background now. These apps are based on development version of pkgs for now - as a next step we would work to version them and add latest release
but most likely it would take a while.
Hi Pawelru, Thanks for the help! Actually quite a few packages were based on latest release and not current version. I have updated packages and voilà! If anyone stumble accross the same issue, here are the specific set of teal packages :
remotes::install_github("insightsengineering/teal@bbb2e17") remotes::install_github("insightsengineering/tern.mmrm@233e3f359") remotes::install_github("insightsengineering/formatters@8672bca") remotes::install_github("insightsengineering/teal.modules.clinical@b63ba64") remotes::install_github("insightsengineering/teal.modules.general@89d22f0") remotes::install_github("insightsengineering/teal.transform@c07e750")
Thanks again for pointing out to the correct answer 🥇
What is your question?
I am discovering the teal packages and wanted to try locally the apps using the teal gallery.
I install the packages and dependencies but when I am trying to launch apps with teal.gallery::launch_app() I have the following error. The error is present in all app except basic-teal.
filters = NULL
indicates that the module doesn't need any data while it has thedata
in formals. Please specifyfilters
with the names of needed datasets or excludedata
from the arguments.For reference below if my sessionInfo()
Thaks for the help!
Code of Conduct
Contribution Guidelines
Security Policy