From ed84f1344abd8a27f2bb480a1471b7dbcc7005aa Mon Sep 17 00:00:00 2001 From: Cesar Barboza Date: Tue, 21 Nov 2023 09:48:58 +0100 Subject: [PATCH] check passing locally --- .Rbuildignore | 1 + DESCRIPTION | 6 ++++-- NAMESPACE | 7 ++++++- R/globals.R | 12 +++++++++++- R/runShinyAlopecia.R | 7 ++++++- man/runShinyAlopecia.Rd | 7 +++++-- 6 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 9affaf0..05f3305 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^LICENSE\.md$ ^\.github$ ^README\.Rmd$ +^rsconnect$ diff --git a/DESCRIPTION b/DESCRIPTION index d8c586d..0957c60 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,8 +21,10 @@ Imports: shinythemes, shinydashboard, shinycssloaders, - shinyWidgets - here + shinyWidgets, + here, + DT, + stringr Suggests: testthat (>= 3.0.0), rmarkdown, diff --git a/NAMESPACE b/NAMESPACE index e84681d..a641e96 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -8,7 +8,6 @@ export(runTreatmentPatterns) import(TreatmentPatterns) import(dplyr) import(here) -import(shiny) import(shinyWidgets) import(shinycssloaders) import(shinydashboard) @@ -20,6 +19,12 @@ importFrom(CohortGenerator,createCohortTables) importFrom(CohortGenerator,generateCohortSet) importFrom(CohortGenerator,getCohortCounts) importFrom(CohortGenerator,getCohortTableNames) +importFrom(DT,dataTableOutput) +importFrom(DT,renderDataTable) importFrom(magrittr,"%>%") importFrom(readr,read_csv) importFrom(readr,write_csv) +importFrom(shiny,h4) +importFrom(shiny,shinyApp) +importFrom(shiny,uiOutput) +importFrom(stringr,str_detect) diff --git a/R/globals.R b/R/globals.R index 1805b4b..03dda6b 100644 --- a/R/globals.R +++ b/R/globals.R @@ -13,4 +13,14 @@ utils::globalVariables(c('sessionInfo', 'cohortSubjects', 'cohortId', 'cohortName', - 'cohortId')) \ No newline at end of file + 'cohortId', + 'age', + 'cdmSourceName', + 'indexYear', + 'sex', + 'targetCohort', + 'reactive', + 'renderUI', + 'tabPanel', + 'tagList', + 'tabsetPanel')) \ No newline at end of file diff --git a/R/runShinyAlopecia.R b/R/runShinyAlopecia.R index caaf0f8..d4c5b05 100644 --- a/R/runShinyAlopecia.R +++ b/R/runShinyAlopecia.R @@ -1,7 +1,12 @@ #' `runAlopeciaShiny()` launches an app to visualise TreatmentPatterns results for the alopecia study. #' -#' @import shiny shinythemes shinydashboard shinycssloaders shinyWidgets TreatmentPatterns here +#' @param resultsFolder Define the results folder path in character. +#' +#' @import shinythemes shinydashboard shinycssloaders shinyWidgets TreatmentPatterns here #' @importFrom readr read_csv +#' @importFrom DT dataTableOutput renderDataTable +#' @importFrom stringr str_detect +#' @importFrom shiny shinyApp h4 uiOutput #' @export runShinyAlopecia <- function(resultsFolder = here::here("results")) { ui <- dashboardPage( diff --git a/man/runShinyAlopecia.Rd b/man/runShinyAlopecia.Rd index 0af2a71..b12a5ae 100644 --- a/man/runShinyAlopecia.Rd +++ b/man/runShinyAlopecia.Rd @@ -1,10 +1,13 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/runShiny.R +% Please edit documentation in R/runShinyAlopecia.R \name{runShinyAlopecia} \alias{runShinyAlopecia} \title{`runAlopeciaShiny()` launches an app to visualise TreatmentPatterns results for the alopecia study.} \usage{ -runShinyAlopecia() +runShinyAlopecia(resultsFolder = here::here("results")) +} +\arguments{ +\item{resultsFolder}{Define the results folder path in character.} } \description{ `runAlopeciaShiny()` launches an app to visualise TreatmentPatterns results for the alopecia study.