From 2faa4181a874bbf93aa218bcb85f754581177ea1 Mon Sep 17 00:00:00 2001 From: Sciurus365 Date: Tue, 11 Jul 2023 15:59:24 +0800 Subject: [PATCH] 23.7.11.1 check gifski before launching the shiny app --- DESCRIPTION | 1 + NEWS.md | 7 +++++++ R/shiny.R | 2 ++ 3 files changed, 10 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index 12f4707..cb5a35b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -39,6 +39,7 @@ Imports: tibble, tidyr Suggests: + gifski, transformr Encoding: UTF-8 LazyData: true diff --git a/NEWS.md b/NEWS.md index c10d110..f22b7e6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,10 @@ +# Development version + +- Bug-fix for the Shiny app (`shiny_Isingland_MDD()`): + - Load the data to the Shiny app environment; + - Check if `gifski` is installed, which is required to render the animations + (also added `gifski` as a suggested package). + # Isinglandr 0.1.0 - Initial release. diff --git a/R/shiny.R b/R/shiny.R index a2e22ce..8c41ac2 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -115,6 +115,8 @@ shiny_ui <- function() { #' @export #' @return This function opens a Shiny app session without a return value. shiny_Isingland_MDD <- function(...) { + rlang::check_installed("gifskii", reason = "to render the animation in the Shiny app.") + app <- shiny::shinyApp(shiny_ui, shiny_server) shiny::runApp(app) }