From ad10f753fa64a6b2fab97bd460030f594e1e2a3c Mon Sep 17 00:00:00 2001 From: Morgan-Wall Date: Wed, 8 Nov 2023 12:12:57 -0500 Subject: [PATCH] skpr v1.5.2: Add missing shiny namespaces and update GHA check --- .github/workflows/R-CMD-check.yaml | 24 ++++++++++++++++++++++-- DESCRIPTION | 2 +- R/skprGUI.R | 15 +++++++++++++-- R/skprGUI_dynamic_ui_elements.R | 2 ++ R/skprGUIserver.R | 19 +++++++++++++++++++ 5 files changed, 57 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index b32be55..a3ac618 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -10,15 +10,33 @@ name: R-CMD-check jobs: R-CMD-check: - runs-on: ubuntu-latest + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 @@ -27,3 +45,5 @@ jobs: needs: check - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/DESCRIPTION b/DESCRIPTION index 76bd698..45e70c1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: skpr Title: Design of Experiments Suite: Generate and Evaluate Optimal Designs Date: 2023-11-08 -Version: 1.5.1 +Version: 1.5.2 Authors@R: c(person("Tyler", "Morgan-Wall", email = "tylermw@gmail.com", role = c("aut", "cre")), person("George", "Khoury", email = "george.m.khoury@gmail.com", role = c("aut"))) Description: Generates and evaluates D, I, A, Alias, E, T, and G optimal designs. Supports generation and evaluation of blocked and split/split-split/.../N-split plot designs. Includes parametric and Monte Carlo power evaluation functions, and supports calculating power for censored responses. Provides a framework to evaluate power using functions provided in other packages or written by the user. Includes a Shiny graphical user interface that displays the underlying code used to create and evaluate the design to improve ease-of-use and make analyses more reproducible. For details, see Morgan-Wall et al. (2021) . diff --git a/R/skprGUI.R b/R/skprGUI.R index c59a3c8..2cf19f7 100644 --- a/R/skprGUI.R +++ b/R/skprGUI.R @@ -2,8 +2,6 @@ #' #'@description skprGUI provides a graphical user interface to skpr, within R Studio. #' -#'@param inputValue1 Required by Shiny -#'@param inputValue2 Required by Shiny #'@param browser Default `FALSE`. Whether to open the application in an external browser. #'@param return_app Default `FALSE`. If `TRUE`, this will return the shinyApp object. #' @@ -39,6 +37,19 @@ skprGUI = function(browser = FALSE, return_app = FALSE) { progressr::handlers(global = TRUE) } #Load Shiny functions from namespace (due to shiny being Suggests) + checkboxInput = shiny::checkboxInput + tagList = shiny::tagList + reactiveVal = shiny::reactiveVal + sliderInput = shiny::sliderInput + incProgress = shiny::incProgress + htmlOutput = shiny::htmlOutput + tableOutput = shiny::tableOutput + icon = shiny::icon + bookmarkButton = shiny::bookmarkButton + mainPanel = shiny::mainPanel + radioButtons = shiny::radioButtons + req = shiny::req + updateNavbarPage = shiny::updateNavbarPage fluidPage = shiny::fluidPage HTML = shiny::HTML sidebarLayout = shiny::sidebarLayout diff --git a/R/skprGUI_dynamic_ui_elements.R b/R/skprGUI_dynamic_ui_elements.R index 99256d7..2850600 100644 --- a/R/skprGUI_dynamic_ui_elements.R +++ b/R/skprGUI_dynamic_ui_elements.R @@ -13,6 +13,7 @@ generate_factor_input_panel = function(factor_n = 1, factor_input_cache = NULL) padding-bottom: 10px; color: rgb(255, 255, 255); border: 0px;" + factorname_n = sprintf("factorname%i",factor_n) factortype_n = sprintf("factortype%i",factor_n) numericlow_n = sprintf("numericlow%i",factor_n) @@ -181,6 +182,7 @@ generate_block_panel = function(any_htc) { #' @return Shiny UI #' @keywords internal generate_optimality_results = function(any_htc) { + textOutput = shiny::textOutput if(!any_htc) { opt_display = shiny::column(width = 6, shiny::h3("Criteria"), diff --git a/R/skprGUIserver.R b/R/skprGUIserver.R index b586b95..bce2dc8 100644 --- a/R/skprGUIserver.R +++ b/R/skprGUIserver.R @@ -25,6 +25,25 @@ skprGUIserver = function(inputValue1, inputValue2) { b64 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAAAnCAYAAAB+HwSQAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AEKEAsxvdBAYQAAAAd0RVh0QXV0aG9yAKmuzEgAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAAKdEVYdENvcHlyaWdodACsD8w6AAAADnRFWHRDcmVhdGlvbiB0aW1lADX3DwkAAAAJdEVYdFNvZnR3YXJlAF1w/zoAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAh0RVh0V2FybmluZwDAG+aHAAAAB3RFWHRTb3VyY2UA9f+D6wAAAAh0RVh0Q29tbWVudAD2zJa/AAAABnRFWHRUaXRsZQCo7tInAAAFW0lEQVRoge2aa6hVRRTHf+vejq/Uq6WZVj6SIEoiSkQpIorMCCSUwkQjtYdpBL3UrJAQLC0lzMgyqC/RBQ2KEAn6UFEISpJBaZpW+KCXmY/ypl7/fZh98nicmb3POfvaRu4fBvaZtWbN2uvMrL1mrQF4BhBwPNAE/Aj0lwTwUNLXHhmTpR0DDgN7gI1Aa6LLbcCFkmi0ASVgc8r7ld/xF2BgLvMmkz+ZCPa1DUCvKmUnJkYNjWm0tQFrgbE5GLYv8GXKfNuAAXkYtNKoV0YmfMWjaG/gUAcatbK9S7JLGjDsmylzfJaXQSXRhEN3wih5+mL8eWMSs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M6LLwTNeoyuFJKaXVMvd24GZJPyW/pwBDPXxtRI6kWZGswtciLA+bWd8QsfxibREBxzx9oXRZR6AVGCPpu4q+UGb+c+VRYnZ4g/DRtQ+x6CRZ7rG7VJuAlqrtMTHCn0fz3qXCBfLLI+O2AYPyKDMDd2TQcypg1WMNmA0sJhyjlYCvgXGS9pvZZFxyt9GPnHBHwyO45MjexCgbcXebdlYyJ9vtfeA64O+IrruB8ZK21KuYmc0GniN+ymrC2eAdSTNOGQ/0S5QJLXVwCds9ktqTl+uB3y3UgrJR2ySluhMza8bdZjmSjI3p+qukmEtLm6s/zqBp79gMNMuV1U+OT5Z6J3KEUduJoxN+mKT/3Kfh/GW3/0+fswbLJK0EZ9TO/Z8PDgDDJe1rIvwl7URtaMFFDBjOqGfyZvTZjHZgmOFu13X61HzQDHz4LwBKRJdWuineAAAAAElFTkSuQmCC" #Load Shiny functions from namespace (due to Shiny being listed in Suggests) + renderText = shiny::renderText + renderUI = shiny::renderUI + renderPlot = shiny::renderPlot + eventReactive = shiny::eventReactive + invalidateLater = shiny::invalidateLater + observe = shiny::observe + checkboxInput = shiny::checkboxInput + tagList = shiny::tagList + reactiveVal = shiny::reactiveVal + sliderInput = shiny::sliderInput + incProgress = shiny::incProgress + htmlOutput = shiny::htmlOutput + tableOutput = shiny::tableOutput + icon = shiny::icon + bookmarkButton = shiny::bookmarkButton + mainPanel = shiny::mainPanel + radioButtons = shiny::radioButtons + req = shiny::req + updateNavbarPage = shiny::updateNavbarPage fluidPage = shiny::fluidPage HTML = shiny::HTML sidebarLayout = shiny::sidebarLayout