From bdea456e46274ac273eaf6d2d0f852b9efa56f15 Mon Sep 17 00:00:00 2001 From: catalamarti Date: Mon, 14 Oct 2024 17:27:09 +0100 Subject: [PATCH] delete --- DESCRIPTION | 2 +- R/about.R | 6 +- R/appDynamic.R | 6 +- R/appStatic.R | 6 +- R/background.R | 2 +- R/createServer.R | 2 +- R/panelFormatted.R | 2 +- R/panelPlot.R | 2 +- R/panelRaw.R | 2 +- R/panelTidy.R | 4 +- R/summary.R | 2 +- R/sysdata.rda | Bin 1776 -> 1788 bytes README.Rmd | 16 +- README.md | 24 +- data-raw/internalData.R | 6 +- man/omopViewer-package.Rd | 27 - tests/testthat.R | 4 +- tests/testthat/_snaps/appStatic.md | 54 +- tests/testthat/_snaps/background.md | 2 +- tests/testthat/_snaps/packagesSupported.md | 1159 +------------------- tests/testthat/_snaps/summary.md | 6 +- tests/testthat/test-choices.R | 4 +- tests/testthat/test-correctSettings.R | 8 +- tests/testthat/test-summary.R | 2 +- vignettes/articles/background.Rmd | 6 +- vignettes/supported_result_type.Rmd | 10 +- 26 files changed, 127 insertions(+), 1237 deletions(-) delete mode 100644 man/omopViewer-package.Rd diff --git a/DESCRIPTION b/DESCRIPTION index b92c5b2..e86cd36 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: omopViewer +Package: OmopViewer Type: Package Title: Visualise OMOP Results in a Shiny App Version: 0.0.0.900 diff --git a/R/about.R b/R/about.R index 3290800..949f620 100644 --- a/R/about.R +++ b/R/about.R @@ -13,11 +13,11 @@ createAbout <- function(logo) { ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), - shiny::strong("v{as.character(utils::packageVersion("omopViewer"))}") + shiny::strong("v{as.character(utils::packageVersion("OmopViewer"))}") ) )' |> glue::glue() |> diff --git a/R/appDynamic.R b/R/appDynamic.R index 6f40956..0ed2cc0 100644 --- a/R/appDynamic.R +++ b/R/appDynamic.R @@ -14,7 +14,7 @@ createDynamicUi <- function(choices) { c( 'bslib::page_navbar(', c( - pageTitle("omopViewer App", logo), + pageTitle("OmopViewer App", logo), loadDataUi(), createUi(choices), 'bslib::nav_spacer()', @@ -174,13 +174,13 @@ messageProcessFiles <- function(x) { } mergeData <- function(newData, originalData) { if (is.null(newData)) return(originalData) - id0 <- getOption("omopViewer.number_ids", 0L) + id0 <- getOption("OmopViewer.number_ids", 0L) newData <- newData |> dplyr::mutate( id = .env$id0 + dplyr::row_number(), upload_datetime = Sys.time() |> format("%Y-%m-%d %H:%M:%S") ) - options("omopViewer.number_ids" = id0 + nrow(newData)) + options("OmopViewer.number_ids" = id0 + nrow(newData)) if (is.null(originalData)) { return(newData) } else { diff --git a/R/appStatic.R b/R/appStatic.R index b9d87dd..ba7e79e 100644 --- a/R/appStatic.R +++ b/R/appStatic.R @@ -139,8 +139,8 @@ exportStaticApp <- function(result, messageShiny <- function() { c( paste0( - "# Generated by omopViewer ", - as.character(utils::packageVersion("omopViewer")) + "# Generated by OmopViewer ", + as.character(utils::packageVersion("OmopViewer")) ), "# Be careful editing this file", "" @@ -179,7 +179,7 @@ logoPath <- function(logo) { lowLogo <- stringr::str_to_lower(logo) # add more logoKeywords in data-raw/internalData if (lowLogo %in% logoKeywords) { - system.file(file.path("logos", paste0(lowLogo, "_logo.svg")), package = "omopViewer") + system.file(file.path("logos", paste0(lowLogo, "_logo.svg")), package = "OmopViewer") } else { logo } diff --git a/R/background.R b/R/background.R index 51cbe59..633deb0 100644 --- a/R/background.R +++ b/R/background.R @@ -96,7 +96,7 @@ createBackground <- function(background) { 'bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") )' } diff --git a/R/createServer.R b/R/createServer.R index 277ef19..1dce8b5 100644 --- a/R/createServer.R +++ b/R/createServer.R @@ -22,7 +22,7 @@ selectiseServer <- function(resultTypes, data) { c( '# fill selectise variables ----', paste0('shiny::observe({ - choices <- omopViewer::getChoices(', data, ', flatten = TRUE) + choices <- OmopViewer::getChoices(', data, ', flatten = TRUE) for (k in seq_along(choices)) { shiny::updateSelectizeInput( session, diff --git a/R/panelFormatted.R b/R/panelFormatted.R index e492e10..c4bf81a 100644 --- a/R/panelFormatted.R +++ b/R/panelFormatted.R @@ -211,7 +211,7 @@ formattedServer <- function(rt, data) { c( 'getFormattedData[formatCamel(rt)] <- shiny::reactive({ [data] |> - omopViewer::filterData("[rt]", input) |> + OmopViewer::filterData("[rt]", input) |> [fun]( [args] ) diff --git a/R/panelPlot.R b/R/panelPlot.R index e4f4856..ac3de5d 100644 --- a/R/panelPlot.R +++ b/R/panelPlot.R @@ -108,7 +108,7 @@ plotsServer <- function(rt, data) { plotServer <- purrr::map_chr(plots, \(id) { c('createPlot[id] <- shiny::reactive({ result <- [data] |> - omopViewer::filterData("[rt]", input) + OmopViewer::filterData("[rt]", input) [createPlotFunction(id)] })', 'output$[rt]_plot_[id] <- [renderPlotFunction(id)]({ diff --git a/R/panelRaw.R b/R/panelRaw.R index 3158932..3822045 100644 --- a/R/panelRaw.R +++ b/R/panelRaw.R @@ -19,7 +19,7 @@ downloadRawDataServer <- function(data) { output$download_raw <- shiny::downloadHandler( filename = "results.csv", content = function(file) { - omopViewer::exportSummarisedResult([data], fileName = file) + OmopViewer::exportSummarisedResult([data], fileName = file) } )' |> glue::glue(.open = "[", .close = "]") |> diff --git a/R/panelTidy.R b/R/panelTidy.R index ad11acf..9740419 100644 --- a/R/panelTidy.R +++ b/R/panelTidy.R @@ -30,8 +30,8 @@ tidyUi <- function(tab) { tidyServer <- function(rt, data) { c(paste0('getTidyData', formatCamel(rt), ' <- shiny::reactive({ res <- ', data, ' |> - omopViewer::filterData("', rt, '", input) |> - omopViewer::tidyData() + OmopViewer::filterData("', rt, '", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) diff --git a/R/summary.R b/R/summary.R index 608147b..07001c3 100644 --- a/R/summary.R +++ b/R/summary.R @@ -146,6 +146,6 @@ summaryTab <- function(summary) { 'bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) )' } diff --git a/R/sysdata.rda b/R/sysdata.rda index d76c90d9c82605cdbb1770d56ffa5d51b4b2f704..81758775247b757d63b290239e45f2e508a7d2a5 100644 GIT binary patch literal 1788 zcmV{dW!vF|*|HS|Q|Nhcv@O3Zk|KPv>|MWlr004yv;0K>R z2=fiEyzcc>UfLAdq+~E^5(M&|2$&;GXpBu67=h_9BhW+C#KAL2GGGn{fY4~rGH3ua z02rDYXc}k%qeg%RjRujSsi7y7Wb%LjG5{I?000008UPX{DU{j`O{CM%4^m*7Z2%y^ zo~8ppXaryY(qR&aK+&YtKSNZ0ig`~^dYTVWwE)J5(DeWS(WZ?W2c!}tAu$Smg)qvV znq>47De8KgBn<;Wrh$+EXbl>9OhQ(kbFY@5%F0|ph!!L$qmpROim7Of1y$;{1S4X^ zt1A&qje|ug697epE*om62}_35N?^j_lb9j^)ZqR=9L1Q}y2%`Edd@ri0lO97f zTC!lpHOF4XS?p0(=%p5QG#E}a6xb%Pi2(~uu)RLxgowP=&C0!E56D6a7&ZHf_s#1l&Kq}c!MK&(&~I`Ud> z$I5dXhAMG5<2eE4MA(?aU8kRH5T+?gQpX?#0K+nbvG?we;`~C<;6&jPDB$Wrc2x#} zz<~JWWzs}i-PIzr^<;omKQoLD{Y0FR-CvCD?IplfL}eWUN$*I4RcT`PE&%z#ixa3| zFKiP=P-7OQk88vtB+$X)X=yl!Oh=Ug5bkIoz%_<0O5fxQnH%%pb>G)NY(aBgf5tgu8$nkWB}FtzO}j z&4O{*c8YLsn83?>9&3+{NZ-RL+$e7d(iQLT36plnaKQ}sWfDb0h24Y_INF;XObcGT zLcUo7$w?tz5~QySWU8krRS?H@L2?v$PA^2!ZHXVITY2tGsH&9;9uTGhaYT8u=Tl&3 zJyQ_6mR^6kjW^b9!lF850FW|gC4Q0cyYnDdrG#UL*a}z_cEwd+B!$6&!Ne3RB}|>b z$1EVH8V{WTcpqSlVQ*MAc%)$xCzq=VYX@Da>wTY!l?+0M2I;(bi;4CS9Gig_&`TOz zDH_r?DkKy~Gi_UkAZg)CleyQa0f-DHXe29|11N88V3mNxzs;f%TC+ypYpohU(?T4z z#fAB+6JnBEG`~h{iRiQ=6f_mEN*TbA^8~OBx(5Jrdp7k0NwgDN&W>6G?b5q@yX(GL zh%Q3#s8FKoDxuWS37!JUG!#(-MPp~1NuPI`(Cn34|41eXHzpBi2)QLmjA0OaT{u=2 zYTOQH!Gi|bDPC86W=w6g+ikYeO)4V@K*kj6e(F;7wz@IIN!d23v`q4aBbf*-3eXx&GUy)oc#W?g zZ|mjATd2$ln8S>&5tP>ofe?(XltQEp7K=ECkXP3d(8Y@oLZsEwRQsQ1;O8O+j)IGD zwM>N;9rZ5_{7@bs}syN}3yVaE9k85zCW!wyJkZ zC0eQQ>+)_Pux;r}wvi*kl`z}Mn>c(1!El2kuCo-;<>jlL_^mvkQOsy0Ah20+AtVti zo}s3wK#J)UDXtL4(qPNLWU@kSF_RN>K)O{-N5PQtVpHT7d|CD6GKof`aLgsf7EJ6q zfWowJ2!_^kz^1ke>3Ty~n2d(ZB2ks!73|n;0ddNtVln#M;udCtvY8CsVTe;lLD!pf zCM)a((zEt~pyFstYX&ykdwyNBlA?Z^129PM3|M5#r6ZkE8NbYM=`(Az7p5Us8^d?- eeFM~;;gWKtQ;{lySUjSC;_gVN3KAU2y!c@E_$PD# literal 1776 zcmV|MWlr004yv;0K=% zr98uHeeUQ0pj~3MY#|bv2dFgAXbl5E0000027mwn0B|%0gGPaqKmnit#L&|~(?AUx zGypVcG*i&kJc>4^N2mY+pa2;F00000&;Z1fN*}5olRy9g>Hq)(AZU7k00002B^1z8 z(rl&)rk;psJwOJU15E%l2ATsyKmZ7&O$mZbnww2DMk7WeB|W7*O)%8aqtx{SPe=nG z4^zykm|KtfcX?|J@KW+dU~?lXMA%K#u9pd*Yr(Prl5bkJ770wE0uq#!KnZC}$cSr* zB2|qMC7ptmTSOXe1#%{g^f1X1P(uKHVqEr2%m!&HRi3758c*#G4Dgm!)U9|o4|Q)Z z$};tEWL%+1@UqdjZw^9;NRAwqfq1>|!0y^Pl>>bs7V&{3kS^jKw|Xt4eUbM;vx^^> ze&ny?+ufER3Am7`qkJMK&FjlAT%?AV#{s(B9RMpn)TPQ@H~SPR2!|%oL@dNLkc2|1 zk`i<|NYg5go(w9bnae7S%#8QyKgDt_gK+VTu%nNTJ8P(@jEyq6%R~)NJ)70;+RDEG z&Q|uq8Y+=RCJCrUp$q`U75qT@)be84h|q7=$2p zbVvhij%wDx-m0dEv!*td8MsTB1Zflz&JYGMVFXDPkwqXXy3;l#kk24l6kst3tW_<+ zQzc?Zh^!(jB1p0WTF_8X<3x9{6boYn9?rq^@G4-=w8$TdR;YB4PgxA2A|sYTN${VS z+d2jJ*|#<2ZHq&$+~IEJCjviQ$1G=FP$z3Wg6riRQg;3)b0fp!64?gg0 z$RoeOQMUYUbxthMOw~v;jsC?p43mchEtg2L6a5+u^bPlVxO|k$y$LA?wM*5dz$>WE zrH@O)IuMu?$t16c2nHTChjYt@ug^}rZ$JyGp)DOS)6hML(*`!DqbNsT%3F>G9Hao! z?2-UfT?aaB-VIUJq-!W?q6?zL$Fk8NED~p2C zJHT0pViLzs!%*CL%kDPzo#Vhk4^CN4OO0O2*2@i5Q$x#Of>;O2!Am^K%c3L`mKw z=`;kxuQKu}X5V=s;x3n%Il$@V-u92V!fHI)4sRe(u$?mShBMJ3oala}3;_MYVif2N z|M?>bkuYb|Yh7hl1!!Os2@+jI)GAVE%2_x< zrcxm*A`iP^r@!X7H5J|Pm{bUG)DpM^zO9ysK&1|@rW=8GLlAQ02oNNOiFCDr?@1z( zNhFCVn*e}f0tg3=EqSQTiS+kQf<&6eB{2!d(al%XYqaebZDnD<&_%}(yPhecM>frt z#4<&x^%uHgrtTArd40fqCU-W-;}7#B{ -[![R-CMD-check](https://github.com/OHDSI/omopViewer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/OHDSI/omopViewer/actions/workflows/R-CMD-check.yaml) -[![CRAN status](https://www.r-pkg.org/badges/version/omopViewer)](https://CRAN.R-project.org/package=omopViewer) +[![R-CMD-check](https://github.com/OHDSI/OmopViewer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/OHDSI/OmopViewer/actions/workflows/R-CMD-check.yaml) +[![CRAN status](https://www.r-pkg.org/badges/version/OmopViewer)](https://CRAN.R-project.org/package=OmopViewer) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![Codecov test coverage](https://codecov.io/gh/OHDSI/omopViewer/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OHDSI/omopViewer?branch=main) +[![Codecov test coverage](https://codecov.io/gh/OHDSI/OmopViewer/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OHDSI/OmopViewer?branch=main) > [!IMPORTANT] > This package is under construction and this is just a first Beta release, please use it carefully and report any issue that you encounter using it. -The goal of omopViewer is to allow the user to easily create Shiny Apps to visualise study results in `` format. +The goal of OmopViewer is to allow the user to easily create Shiny Apps to visualise study results in `` format. ## Installation -You can install the development version of omopViewer from [GitHub](https://github.com/OHDSI/omopViewer) with: +You can install the development version of OmopViewer from [GitHub](https://github.com/OHDSI/OmopViewer) with: ``` {r, eval = FALSE} install.packages("pak") -pak::pkg_install("OHDSI/omopViewer") +pak::pkg_install("OHDSI/OmopViewer") ``` ## Main functionalities ```{r} -library(omopViewer) +library(OmopViewer) ``` The package can be divided in 3 main functionalities: diff --git a/README.md b/README.md index aab003c..fb4b506 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,40 @@ -# omopViewer +# OmopViewer -[![R-CMD-check](https://github.com/OHDSI/omopViewer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/OHDSI/omopViewer/actions/workflows/R-CMD-check.yaml) +[![R-CMD-check](https://github.com/OHDSI/OmopViewer/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/OHDSI/OmopViewer/actions/workflows/R-CMD-check.yaml) [![CRAN -status](https://www.r-pkg.org/badges/version/omopViewer)](https://CRAN.R-project.org/package=omopViewer) +status](https://www.r-pkg.org/badges/version/OmopViewer)](https://CRAN.R-project.org/package=OmopViewer) [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![Codecov test -coverage](https://codecov.io/gh/OHDSI/omopViewer/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OHDSI/omopViewer?branch=main) +coverage](https://codecov.io/gh/OHDSI/OmopViewer/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OHDSI/OmopViewer?branch=main) > \[!IMPORTANT\] This package is under construction and this is just a > first Beta release, please use it carefully and report any issue that > you encounter using it. -The goal of omopViewer is to allow the user to easily create Shiny Apps +The goal of OmopViewer is to allow the user to easily create Shiny Apps to visualise study results in `` format. ## Installation -You can install the development version of omopViewer from -[GitHub](https://github.com/OHDSI/omopViewer) with: +You can install the development version of OmopViewer from +[GitHub](https://github.com/OHDSI/OmopViewer) with: ``` r install.packages("pak") -pak::pkg_install("OHDSI/omopViewer") +pak::pkg_install("OHDSI/OmopViewer") ``` ## Main functionalities ``` r -library(omopViewer) +library(OmopViewer) ``` The package can be divided in 3 main functionalities: - Static shiny @@ -50,9 +50,6 @@ results and can be modified later locally. # lets generate some results library(CohortCharacteristics) cdm <- mockCohortCharacteristics() -#> Note: method with signature 'DBIConnection#Id' chosen for function 'dbExistsTable', -#> target signature 'duckdb_connection#Id'. -#> "duckdb_connection#ANY" would also be valid result <- summariseCharacteristics(cdm$cohort1) |> bind(summariseCohortAttrition(cdm$cohort1)) #> ℹ adding demographics columns @@ -60,12 +57,11 @@ result <- summariseCharacteristics(cdm$cohort1) |> #> ✔ summariseCharacteristics finished! exportStaticApp(result = result) -#> ℹ shiny folder will be overwritten. #> ℹ Processing data #> ✔ Data processed: 2 result types idenfied: `summarise_characteristics` and #> `summarise_cohort_attrition`. #> ℹ Creating shiny from provided data -#> ✔ Shiny created in: /Users/martics/Documents/GitHub/omopViewer/shiny +#> ✔ Shiny created in: C:/Users/martics/Documents/GitHub/omopViewer/shiny ``` ## Dynamic shiny app diff --git a/data-raw/internalData.R b/data-raw/internalData.R index 70c02fb..863b2c7 100644 --- a/data-raw/internalData.R +++ b/data-raw/internalData.R @@ -45,7 +45,7 @@ omopViewerPlotArguments <- dplyr::tribble( omopViewerTables <- dplyr::tribble( ~table_id, ~result_tab_id, ~title, ~fun, ~output, - 0L, 0L, "Formatted", "omopViewer::omopViewerTable", "gt", + 0L, 0L, "Formatted", "OmopViewer::omopViewerTable", "gt", 1L, 1L, "Table cohort overlap", "tableCohortOverlap", "gt", 2L, 2L, "Table cohort attrition", "tableCohortAttrition", "gt", 3L, 3L, "Table cohort timing", "tableCohortTiming", "gt", @@ -127,8 +127,8 @@ omopViewerProj <- c( ) omopViewerGlobal <- c( - "data <- omopViewer::importSummarisedResult(here::here(\"data\")) |>", - "omopViewer::correctSettings()" + "data <- OmopViewer::importSummarisedResult(here::here(\"data\")) |>", + "OmopViewer::correctSettings()" ) |> styleCode() diff --git a/man/omopViewer-package.Rd b/man/omopViewer-package.Rd deleted file mode 100644 index 82adbc8..0000000 --- a/man/omopViewer-package.Rd +++ /dev/null @@ -1,27 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/omopViewer-package.R -\docType{package} -\name{omopViewer-package} -\alias{omopViewer} -\alias{omopViewer-package} -\title{omopViewer: Visualise OMOP Results in a Shiny App} -\description{ -Visualise results obtained from analysing data mapped to the Observational Medical Outcomes Partnership (OMOP) common data model using Shiny Apps. -} -\seealso{ -Useful links: -\itemize{ - \item \url{https://ohdsi.github.io/OmopViewer/} -} - -} -\author{ -\strong{Maintainer}: Martí Català \email{marti.catalasabate@ndorms.ox.ac.uk} (\href{https://orcid.org/0000-0003-3308-9905}{ORCID}) - -Authors: -\itemize{ - \item Yuchen Guo \email{yuchen.guo@ndorms.ox.ac.uk} (\href{https://orcid.org/0000-0002-0847-4855}{ORCID}) -} - -} -\keyword{internal} diff --git a/tests/testthat.R b/tests/testthat.R index f726635..0b5d933 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -7,6 +7,6 @@ # * https://testthat.r-lib.org/articles/special-files.html library(testthat) -library(omopViewer) +library(OmopViewer) -test_check("omopViewer") +test_check("OmopViewer") diff --git a/tests/testthat/_snaps/appStatic.md b/tests/testthat/_snaps/appStatic.md index 6e27f6e..82e0706 100644 --- a/tests/testthat/_snaps/appStatic.md +++ b/tests/testthat/_snaps/appStatic.md @@ -17,7 +17,7 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_spacer(), bslib::nav_item( @@ -43,8 +43,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -63,7 +63,7 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_spacer(), bslib::nav_item( @@ -89,8 +89,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -109,7 +109,7 @@ output$download_raw <- shiny::downloadHandler( filename = "results.csv", content = function(file) { - omopViewer::exportSummarisedResult(data, fileName = file) + OmopViewer::exportSummarisedResult(data, fileName = file) } ) } @@ -119,7 +119,7 @@ Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -136,12 +136,12 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) ), bslib::nav_spacer(), bslib::nav_item( @@ -167,8 +167,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -182,7 +182,7 @@ Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -199,12 +199,12 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) ), bslib::nav_panel( title = c("Cohort count"), @@ -822,8 +822,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -837,7 +837,7 @@ Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -854,12 +854,12 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) ), bslib::nav_panel( title = c("Cohort overlap"), @@ -1477,8 +1477,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -1492,7 +1492,7 @@ Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -1509,12 +1509,12 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) ), bslib::nav_menu( title = c("DETAILS"), @@ -2136,8 +2136,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") diff --git a/tests/testthat/_snaps/background.md b/tests/testthat/_snaps/background.md index a648a54..52abc0e 100644 --- a/tests/testthat/_snaps/background.md +++ b/tests/testthat/_snaps/background.md @@ -6,7 +6,7 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ) --- diff --git a/tests/testthat/_snaps/packagesSupported.md b/tests/testthat/_snaps/packagesSupported.md index fe2987a..8064cb9 100644 --- a/tests/testthat/_snaps/packagesSupported.md +++ b/tests/testthat/_snaps/packagesSupported.md @@ -3,7 +3,7 @@ Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -20,12 +20,12 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = "Summary", icon = shiny::icon("file-alt"), - omopViewer::cardSummary(data) + OmopViewer::cardSummary(data) ), bslib::nav_panel( title = c("Cohort characteristics"), @@ -1280,8 +1280,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -1295,7 +1295,7 @@ Code cat(server, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file server <- function(input, output, session) { @@ -1303,12 +1303,12 @@ output$download_raw <- shiny::downloadHandler( filename = "results.csv", content = function(file) { - omopViewer::exportSummarisedResult(data, fileName = file) + OmopViewer::exportSummarisedResult(data, fileName = file) } ) # fill selectise variables ---- shiny::observe({ - choices <- omopViewer::getChoices(data, flatten = TRUE) + choices <- OmopViewer::getChoices(data, flatten = TRUE) for (k in seq_along(choices)) { shiny::updateSelectizeInput( session, @@ -1323,8 +1323,8 @@ ## tidy summarise_characteristics ----- getTidyDataSummariseCharacteristics <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_characteristics", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_characteristics", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1364,7 +1364,7 @@ ## formatted summarise_characteristics ----- getFormattedDataSummariseCharacteristics <- shiny::reactive({ data |> - omopViewer::filterData("summarise_characteristics", input) |> + OmopViewer::filterData("summarise_characteristics", input) |> CohortCharacteristics::tableCharacteristics( header = input$summarise_characteristics_formatted_4_header, groupColumn = input$summarise_characteristics_formatted_4_groupColumn, @@ -1386,7 +1386,7 @@ ## plot summarise_characteristics ----- createPlot4 <- shiny::reactive({ result <- data |> - omopViewer::filterData("summarise_characteristics", input) + OmopViewer::filterData("summarise_characteristics", input) CohortCharacteristics::plotCharacteristics( result, plotStyle = input$summarise_characteristics_plot_4_plot_style, @@ -1416,8 +1416,8 @@ ## tidy summarise_cohort_attrition ----- getTidyDataSummariseCohortAttrition <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_cohort_attrition", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_cohort_attrition", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1457,7 +1457,7 @@ ## formatted summarise_cohort_attrition ----- getFormattedDataSummariseCohortAttrition <- shiny::reactive({ data |> - omopViewer::filterData("summarise_cohort_attrition", input) |> + OmopViewer::filterData("summarise_cohort_attrition", input) |> CohortCharacteristics::tableCohortAttrition( header = input$summarise_cohort_attrition_formatted_2_header, groupColumn = input$summarise_cohort_attrition_formatted_2_groupColumn, @@ -1479,7 +1479,7 @@ ## plot summarise_cohort_attrition ----- createPlot2 <- shiny::reactive({ result <- data |> - omopViewer::filterData("summarise_cohort_attrition", input) + OmopViewer::filterData("summarise_cohort_attrition", input) CohortCharacteristics::plotCohortAttrition( result ) @@ -1504,8 +1504,8 @@ ## tidy summarise_cohort_count ----- getTidyDataSummariseCohortCount <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_cohort_count", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_cohort_count", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1545,7 +1545,7 @@ ## formatted summarise_cohort_count ----- getFormattedDataSummariseCohortCount <- shiny::reactive({ data |> - omopViewer::filterData("summarise_cohort_count", input) |> + OmopViewer::filterData("summarise_cohort_count", input) |> CohortCharacteristics::tableCohortCount( header = input$summarise_cohort_count_formatted_5_header, groupColumn = input$summarise_cohort_count_formatted_5_groupColumn, @@ -1567,7 +1567,7 @@ ## plot summarise_cohort_count ----- createPlot5 <- shiny::reactive({ result <- data |> - omopViewer::filterData("summarise_cohort_count", input) + OmopViewer::filterData("summarise_cohort_count", input) CohortCharacteristics::plotCohortCount( result, facet = input$summarise_cohort_count_plot_5_facet, @@ -1596,8 +1596,8 @@ ## tidy summarise_cohort_overlap ----- getTidyDataSummariseCohortOverlap <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_cohort_overlap", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_cohort_overlap", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1637,7 +1637,7 @@ ## formatted summarise_cohort_overlap ----- getFormattedDataSummariseCohortOverlap <- shiny::reactive({ data |> - omopViewer::filterData("summarise_cohort_overlap", input) |> + OmopViewer::filterData("summarise_cohort_overlap", input) |> CohortCharacteristics::tableCohortOverlap( uniqueCombinations = input$summarise_cohort_overlap_formatted_1_uniqueCombinations, header = input$summarise_cohort_overlap_formatted_1_header, @@ -1660,7 +1660,7 @@ ## plot summarise_cohort_overlap ----- createPlot1 <- shiny::reactive({ result <- data |> - omopViewer::filterData("summarise_cohort_overlap", input) + OmopViewer::filterData("summarise_cohort_overlap", input) CohortCharacteristics::plotCohortOverlap( result, facet = input$summarise_cohort_overlap_plot_1_facet, @@ -1689,8 +1689,8 @@ ## tidy summarise_cohort_timing ----- getTidyDataSummariseCohortTiming <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_cohort_timing", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_cohort_timing", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1730,7 +1730,7 @@ ## formatted summarise_cohort_timing ----- getFormattedDataSummariseCohortTiming <- shiny::reactive({ data |> - omopViewer::filterData("summarise_cohort_timing", input) |> + OmopViewer::filterData("summarise_cohort_timing", input) |> CohortCharacteristics::tableCohortTiming( uniqueCombinations = input$summarise_cohort_timing_formatted_3_uniqueCombinations, timeScale = input$summarise_cohort_timing_formatted_3_timeScale, @@ -1754,7 +1754,7 @@ ## plot summarise_cohort_timing ----- createPlot3 <- shiny::reactive({ result <- data |> - omopViewer::filterData("summarise_cohort_timing", input) + OmopViewer::filterData("summarise_cohort_timing", input) CohortCharacteristics::plotCohortTiming( result, plotType = input$summarise_cohort_timing_plot_3_plot_type, @@ -1786,8 +1786,8 @@ ## tidy summarise_large_scale_characteristics ----- getTidyDataSummariseLargeScaleCharacteristics <- shiny::reactive({ res <- data |> - omopViewer::filterData("summarise_large_scale_characteristics", input) |> - omopViewer::tidyData() + OmopViewer::filterData("summarise_large_scale_characteristics", input) |> + OmopViewer::tidyData() # columns to eliminate colsEliminate <- colnames(res) @@ -1827,8 +1827,8 @@ ## formatted summarise_large_scale_characteristics ----- getFormattedDataSummariseLargeScaleCharacteristics <- shiny::reactive({ data |> - omopViewer::filterData("summarise_large_scale_characteristics", input) |> - omopViewer::omopViewerTable( + OmopViewer::filterData("summarise_large_scale_characteristics", input) |> + OmopViewer::omopViewerTable( header = input$summarise_large_scale_characteristics_formatted_0_header, group = input$summarise_large_scale_characteristics_formatted_0_group, hide = input$summarise_large_scale_characteristics_formatted_0_hide @@ -1854,32 +1854,32 @@ Code cat(global, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file library(CohortCharacteristics) library(DT) library(DiagrammeR) + library(OmopViewer) library(bslib) library(dplyr) library(ggplot2) library(gt) library(here) - library(omopViewer) library(readr) library(shiny) library(sortable) library(visOmopResults) - data <- omopViewer::importSummarisedResult(here::here("data")) |> - omopViewer::correctSettings() + data <- OmopViewer::importSummarisedResult(here::here("data")) |> + OmopViewer::correctSettings() --- Code cat(ui, sep = "\n") Output - # Generated by omopViewer 0.0.0.900 + # Generated by OmopViewer 0.0.0.900 # Be careful editing this file ui <- bslib::page_navbar( @@ -1896,7 +1896,7 @@ bslib::nav_panel( title = "Background", icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") + OmopViewer::cardFromMd("background.md") ), bslib::nav_panel( title = c("Cohort characteristics"), @@ -3151,8 +3151,8 @@ ), "This shiny app was generated with ", shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", + "OmopViewer", + href = "https://github.com/OHDSI/OmopViewer", target = "_blank" ), shiny::strong("v0.0.0.900") @@ -3161,1082 +3161,3 @@ bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light")) ) -# CodelistGenerator shiny - - Code - cat(ui, sep = "\n") - Output - # Generated by omopViewer 0.0.0.900 - # Be careful editing this file - - ui <- bslib::page_navbar( - title = shiny::tags$span( - shiny::tags$img( - src = "ohdsi_logo.svg", - width = "auto", - height = "46px", - class = "me-3", - alt = "logo" - ), - "" - ), - bslib::nav_panel( - title = "Background", - icon = shiny::icon("disease"), - omopViewer::cardFromMd("background.md") - ), - bslib::nav_panel( - title = c("Orphan codes"), - icon = shiny::icon("magnifying-glass-arrow-right"), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - bslib::accordion( - bslib::accordion_panel( - title = "Information", - icon = shiny::icon("info"), - shiny::p("") - ), - bslib::accordion_panel( - title = "grouping", - shiny::selectizeInput( - inputId = "orphan_code_use_grouping_cdm_name", - label = "Cdm name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "orphan_code_use_grouping_codelist_name", - label = "Codelist name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "orphan_code_use_grouping_domain_id", - label = "Domain id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "orphan_code_use_grouping_standard_concept", - label = "Standard concept", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "orphan_code_use_grouping_vocabulary_id", - label = "Vocabulary id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Variables", - shiny::selectizeInput( - inputId = "orphan_code_use_variable_name", - label = "Variable name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Estimates", - shiny::selectizeInput( - inputId = "orphan_code_use_estimate_name", - label = "Estimate name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ) - ) - ), - bslib::navset_card_tab( - bslib::nav_panel( - title = "Tidy", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::downloadButton(outputId = "orphan_code_use_tidy_download", label = "Download csv") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - shiny::selectizeInput( - inputId = "orphan_code_use_tidy_columns", - label = "Columns", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::radioButtons( - inputId = "orphan_code_use_tidy_pivot", - label = "Pivot estimates/variables", - choices = c("none", "estimates", "estimates and variables"), - selected = "none" - ), - position = "right" - ), - DT::dataTableOutput("orphan_code_use_tidy") - ) - ) - ), - bslib::nav_panel( - title = "Table orphan codes", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::selectizeInput( - inputId = "orphan_code_use_formatted_download_6_type", - label = "File", - choices = c("docx", "png", "pdf", "html"), - selected = c("docx"), - multiple = FALSE, - options = list(plugins = "remove_button") - ), - shiny::downloadButton(outputId = "orphan_code_use_formatted_download_6", label = "Download") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - sortable::bucket_list( - header = NULL, - sortable::add_rank_list( - text = c("none"), - labels = c("codelist_name", "domain_id", "standard_concept", "vocabulary_id", "variable_name", "variable_level"), - input_id = "orphan_code_use_formatted_6_none" - ), - sortable::add_rank_list( - text = c("header"), - labels = c("cdm_name", "estimate_name"), - input_id = "orphan_code_use_formatted_6_header" - ), - sortable::add_rank_list( - text = c("groupColumn"), - labels = NULL, - input_id = "orphan_code_use_formatted_6_groupColumn" - ), - sortable::add_rank_list( - text = c("hide"), - labels = NULL, - input_id = "orphan_code_use_formatted_6_hide" - ) - ), - position = "right" - ), - gt::gt_output("orphan_code_use_formatted_6") - ) - ) - ), - ) - ) - ), - bslib::nav_panel( - title = c("Cohort code use"), - icon = shiny::icon("chart-column"), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - bslib::accordion( - bslib::accordion_panel( - title = "Information", - icon = shiny::icon("info"), - shiny::p("") - ), - bslib::accordion_panel( - title = "Settings", - shiny::selectizeInput( - inputId = "cohort_code_use_settings_timing", - label = "Timing", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "grouping", - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_cdm_name", - label = "Cdm name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_cohort_name", - label = "Cohort name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_codelist_name", - label = "Codelist name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_source_concept_name", - label = "Source concept name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_source_concept_id", - label = "Source concept id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "cohort_code_use_grouping_domain_id", - label = "Domain id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Variables", - shiny::selectizeInput( - inputId = "cohort_code_use_variable_name", - label = "Variable name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Estimates", - shiny::selectizeInput( - inputId = "cohort_code_use_estimate_name", - label = "Estimate name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ) - ) - ), - bslib::navset_card_tab( - bslib::nav_panel( - title = "Tidy", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::downloadButton(outputId = "cohort_code_use_tidy_download", label = "Download csv") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - shiny::selectizeInput( - inputId = "cohort_code_use_tidy_columns", - label = "Columns", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::radioButtons( - inputId = "cohort_code_use_tidy_pivot", - label = "Pivot estimates/variables", - choices = c("none", "estimates", "estimates and variables"), - selected = "none" - ), - position = "right" - ), - DT::dataTableOutput("cohort_code_use_tidy") - ) - ) - ), - bslib::nav_panel( - title = "Table cohort code use", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::selectizeInput( - inputId = "cohort_code_use_formatted_download_7_type", - label = "File", - choices = c("docx", "png", "pdf", "html"), - selected = c("docx"), - multiple = FALSE, - options = list(plugins = "remove_button") - ), - shiny::downloadButton(outputId = "cohort_code_use_formatted_download_7", label = "Download") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - shiny::checkboxInput( - inputId = "cohort_code_use_formatted_7_timing", - label = "timing", - value = c(FALSE) - ), - sortable::bucket_list( - header = NULL, - sortable::add_rank_list( - text = c("none"), - labels = c("cohort_name", "codelist_name", "source_concept_name", "source_concept_id", "domain_id", "variable_name", "variable_level"), - input_id = "cohort_code_use_formatted_7_none" - ), - sortable::add_rank_list( - text = c("header"), - labels = c("cdm_name", "estimate_name"), - input_id = "cohort_code_use_formatted_7_header" - ), - sortable::add_rank_list( - text = c("groupColumn"), - labels = NULL, - input_id = "cohort_code_use_formatted_7_groupColumn" - ), - sortable::add_rank_list( - text = c("hide"), - labels = NULL, - input_id = "cohort_code_use_formatted_7_hide" - ) - ), - position = "right" - ), - gt::gt_output("cohort_code_use_formatted_7") - ) - ) - ), - ) - ) - ), - bslib::nav_panel( - title = c("Code use"), - icon = shiny::icon("chart-column"), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - bslib::accordion( - bslib::accordion_panel( - title = "Information", - icon = shiny::icon("info"), - shiny::p("") - ), - bslib::accordion_panel( - title = "grouping", - shiny::selectizeInput( - inputId = "code_use_grouping_cdm_name", - label = "Cdm name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_codelist_name", - label = "Codelist name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_year", - label = "Year", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_sex", - label = "Sex", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_source_concept_name", - label = "Source concept name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_source_concept_id", - label = "Source concept id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "code_use_grouping_domain_id", - label = "Domain id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Variables", - shiny::selectizeInput( - inputId = "code_use_variable_name", - label = "Variable name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Estimates", - shiny::selectizeInput( - inputId = "code_use_estimate_name", - label = "Estimate name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ) - ) - ), - bslib::navset_card_tab( - bslib::nav_panel( - title = "Tidy", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::downloadButton(outputId = "code_use_tidy_download", label = "Download csv") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - shiny::selectizeInput( - inputId = "code_use_tidy_columns", - label = "Columns", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::radioButtons( - inputId = "code_use_tidy_pivot", - label = "Pivot estimates/variables", - choices = c("none", "estimates", "estimates and variables"), - selected = "none" - ), - position = "right" - ), - DT::dataTableOutput("code_use_tidy") - ) - ) - ), - bslib::nav_panel( - title = "Table code use", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::selectizeInput( - inputId = "code_use_formatted_download_8_type", - label = "File", - choices = c("docx", "png", "pdf", "html"), - selected = c("docx"), - multiple = FALSE, - options = list(plugins = "remove_button") - ), - shiny::downloadButton(outputId = "code_use_formatted_download_8", label = "Download") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - sortable::bucket_list( - header = NULL, - sortable::add_rank_list( - text = c("none"), - labels = c("codelist_name", "year", "sex", "source_concept_name", "source_concept_id", "domain_id", "variable_name", "variable_level"), - input_id = "code_use_formatted_8_none" - ), - sortable::add_rank_list( - text = c("header"), - labels = c("cdm_name", "estimate_name"), - input_id = "code_use_formatted_8_header" - ), - sortable::add_rank_list( - text = c("groupColumn"), - labels = NULL, - input_id = "code_use_formatted_8_groupColumn" - ), - sortable::add_rank_list( - text = c("hide"), - labels = NULL, - input_id = "code_use_formatted_8_hide" - ) - ), - position = "right" - ), - gt::gt_output("code_use_formatted_8") - ) - ) - ), - ) - ) - ), - bslib::nav_panel( - title = c("Achilles code use"), - icon = shiny::icon("chart-column"), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - bslib::accordion( - bslib::accordion_panel( - title = "Information", - icon = shiny::icon("info"), - shiny::p("") - ), - bslib::accordion_panel( - title = "grouping", - shiny::selectizeInput( - inputId = "achilles_code_use_grouping_cdm_name", - label = "Cdm name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "achilles_code_use_grouping_codelist_name", - label = "Codelist name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "achilles_code_use_grouping_domain_id", - label = "Domain id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "achilles_code_use_grouping_standard_concept", - label = "Standard concept", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::selectizeInput( - inputId = "achilles_code_use_grouping_vocabulary_id", - label = "Vocabulary id", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Variables", - shiny::selectizeInput( - inputId = "achilles_code_use_variable_name", - label = "Variable name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ), - bslib::accordion_panel( - title = "Estimates", - shiny::selectizeInput( - inputId = "achilles_code_use_estimate_name", - label = "Estimate name", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ) - ) - ) - ), - bslib::navset_card_tab( - bslib::nav_panel( - title = "Tidy", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::downloadButton(outputId = "achilles_code_use_tidy_download", label = "Download csv") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - shiny::selectizeInput( - inputId = "achilles_code_use_tidy_columns", - label = "Columns", - choices = NULL, - selected = NULL, - multiple = TRUE, - options = list(plugins = "remove_button") - ), - shiny::radioButtons( - inputId = "achilles_code_use_tidy_pivot", - label = "Pivot estimates/variables", - choices = c("none", "estimates", "estimates and variables"), - selected = "none" - ), - position = "right" - ), - DT::dataTableOutput("achilles_code_use_tidy") - ) - ) - ), - bslib::nav_panel( - title = "Table achilles code use", - bslib::card( - full_screen = TRUE, - bslib::card_header( - bslib::popover( - shiny::icon("download"), - shiny::selectizeInput( - inputId = "achilles_code_use_formatted_download_9_type", - label = "File", - choices = c("docx", "png", "pdf", "html"), - selected = c("docx"), - multiple = FALSE, - options = list(plugins = "remove_button") - ), - shiny::downloadButton(outputId = "achilles_code_use_formatted_download_9", label = "Download") - ), - class = "text-end" - ), - bslib::layout_sidebar( - sidebar = bslib::sidebar( - sortable::bucket_list( - header = NULL, - sortable::add_rank_list( - text = c("none"), - labels = c("codelist_name", "domain_id", "standard_concept", "vocabulary_id", "variable_name", "variable_level"), - input_id = "achilles_code_use_formatted_9_none" - ), - sortable::add_rank_list( - text = c("header"), - labels = c("cdm_name", "estimate_name"), - input_id = "achilles_code_use_formatted_9_header" - ), - sortable::add_rank_list( - text = c("groupColumn"), - labels = NULL, - input_id = "achilles_code_use_formatted_9_groupColumn" - ), - sortable::add_rank_list( - text = c("hide"), - labels = NULL, - input_id = "achilles_code_use_formatted_9_hide" - ) - ), - position = "right" - ), - gt::gt_output("achilles_code_use_formatted_9") - ) - ) - ), - ) - ) - ), - bslib::nav_spacer(), - bslib::nav_item( - bslib::popover( - shiny::icon("download"), - shiny::downloadButton( - outputId = "download_raw", - label = "Download raw data", - icon = shiny::icon("download") - ) - ) - ), - bslib::nav_item( - bslib::popover( - shiny::icon("circle-info"), - shiny::tags$img( - src = "hds_logo.svg", - class = "logo-img", - alt = "Logo", - height = "auto", - width = "30%", - style = "float:right" - ), - "This shiny app was generated with ", - shiny::a( - "omopViewer", - href = "https://github.com/OHDSI/omopViewer", - target = "_blank" - ), - shiny::strong("v0.0.0.900") - ) - ), - bslib::nav_item(bslib::input_dark_mode(id = "dark_mode", mode = "light")) - ) - ---- - - Code - cat(server, sep = "\n") - Output - # Generated by omopViewer 0.0.0.900 - # Be careful editing this file - - server <- function(input, output, session) { - # download raw data ----- - output$download_raw <- shiny::downloadHandler( - filename = "results.csv", - content = function(file) { - omopViewer::exportSummarisedResult(data, fileName = file) - } - ) - # fill selectise variables ---- - shiny::observe({ - choices <- omopViewer::getChoices(data, flatten = TRUE) - for (k in seq_along(choices)) { - shiny::updateSelectizeInput( - session, - inputId = names(choices)[k], - choices = choices[[k]], - selected = choices[[k]], - server = TRUE - ) - } - }) - # orphan_code_use ----- - ## tidy orphan_code_use ----- - getTidyDataOrphanCodeUse <- shiny::reactive({ - res <- data |> - omopViewer::filterData("orphan_code_use", input) |> - omopViewer::tidyData() - - # columns to eliminate - colsEliminate <- colnames(res) - colsEliminate <- colsEliminate[!colsEliminate %in% c( - input$orphan_code_use_tidy_columns, "variable_name", "variable_level", - "estimate_name", "estimate_type", "estimate_value" - )] - - # pivot - pivot <- input$orphan_code_use_tidy_pivot - if (pivot != "none") { - vars <- switch(pivot, - "estimates" = "estimate_name", - "estimates and variables" = c("variable_name", "variable_level", "estimate_name") - ) - res <- res |> - visOmopResults::pivotEstimates(pivotEstimatesBy = vars) - } - - res |> - dplyr::select(!dplyr::all_of(colsEliminate)) - }) - output$orphan_code_use_tidy <- DT::renderDT({ - DT::datatable( - getTidyDataOrphanCodeUse(), - options = list(scrollX = TRUE), - rownames = FALSE - ) - }) - output$orphan_code_use_tidy_download <- shiny::downloadHandler( - filename = "tidy_orphan_code_use.csv", - content = function(file) { - getTidyDataOrphanCodeUse() |> - readr::write_csv(file = file) - } - ) - ## formatted orphan_code_use ----- - getFormattedDataOrphanCodeUse <- shiny::reactive({ - data |> - omopViewer::filterData("orphan_code_use", input) |> - CodelistGenerator::tableOrphanCodes( - header = input$orphan_code_use_formatted_6_header, - groupColumn = input$orphan_code_use_formatted_6_groupColumn, - hide = input$orphan_code_use_formatted_6_hide - ) - }) - output$orphan_code_use_formatted_6 <- gt::render_gt({ - getFormattedDataOrphanCodeUse() - }) - output$orphan_code_use_formatted_download_6 <- shiny::downloadHandler( - filename = function() { - paste0("formatted_orphan_code_use.", input$orphan_code_use_formatted_download_6_type) - }, - content = function(file) { - getFormattedDataOrphanCodeUse() |> - gt::gtsave(filename = file) - } - ) - ## plot orphan_code_use ----- - - - # cohort_code_use ----- - ## tidy cohort_code_use ----- - getTidyDataCohortCodeUse <- shiny::reactive({ - res <- data |> - omopViewer::filterData("cohort_code_use", input) |> - omopViewer::tidyData() - - # columns to eliminate - colsEliminate <- colnames(res) - colsEliminate <- colsEliminate[!colsEliminate %in% c( - input$cohort_code_use_tidy_columns, "variable_name", "variable_level", - "estimate_name", "estimate_type", "estimate_value" - )] - - # pivot - pivot <- input$cohort_code_use_tidy_pivot - if (pivot != "none") { - vars <- switch(pivot, - "estimates" = "estimate_name", - "estimates and variables" = c("variable_name", "variable_level", "estimate_name") - ) - res <- res |> - visOmopResults::pivotEstimates(pivotEstimatesBy = vars) - } - - res |> - dplyr::select(!dplyr::all_of(colsEliminate)) - }) - output$cohort_code_use_tidy <- DT::renderDT({ - DT::datatable( - getTidyDataCohortCodeUse(), - options = list(scrollX = TRUE), - rownames = FALSE - ) - }) - output$cohort_code_use_tidy_download <- shiny::downloadHandler( - filename = "tidy_cohort_code_use.csv", - content = function(file) { - getTidyDataCohortCodeUse() |> - readr::write_csv(file = file) - } - ) - ## formatted cohort_code_use ----- - getFormattedDataCohortCodeUse <- shiny::reactive({ - data |> - omopViewer::filterData("cohort_code_use", input) |> - CodelistGenerator::tableCohortCodeUse( - timing = input$cohort_code_use_formatted_7_timing, - header = input$cohort_code_use_formatted_7_header, - groupColumn = input$cohort_code_use_formatted_7_groupColumn, - hide = input$cohort_code_use_formatted_7_hide - ) - }) - output$cohort_code_use_formatted_7 <- gt::render_gt({ - getFormattedDataCohortCodeUse() - }) - output$cohort_code_use_formatted_download_7 <- shiny::downloadHandler( - filename = function() { - paste0("formatted_cohort_code_use.", input$cohort_code_use_formatted_download_7_type) - }, - content = function(file) { - getFormattedDataCohortCodeUse() |> - gt::gtsave(filename = file) - } - ) - ## plot cohort_code_use ----- - - - # code_use ----- - ## tidy code_use ----- - getTidyDataCodeUse <- shiny::reactive({ - res <- data |> - omopViewer::filterData("code_use", input) |> - omopViewer::tidyData() - - # columns to eliminate - colsEliminate <- colnames(res) - colsEliminate <- colsEliminate[!colsEliminate %in% c( - input$code_use_tidy_columns, "variable_name", "variable_level", - "estimate_name", "estimate_type", "estimate_value" - )] - - # pivot - pivot <- input$code_use_tidy_pivot - if (pivot != "none") { - vars <- switch(pivot, - "estimates" = "estimate_name", - "estimates and variables" = c("variable_name", "variable_level", "estimate_name") - ) - res <- res |> - visOmopResults::pivotEstimates(pivotEstimatesBy = vars) - } - - res |> - dplyr::select(!dplyr::all_of(colsEliminate)) - }) - output$code_use_tidy <- DT::renderDT({ - DT::datatable( - getTidyDataCodeUse(), - options = list(scrollX = TRUE), - rownames = FALSE - ) - }) - output$code_use_tidy_download <- shiny::downloadHandler( - filename = "tidy_code_use.csv", - content = function(file) { - getTidyDataCodeUse() |> - readr::write_csv(file = file) - } - ) - ## formatted code_use ----- - getFormattedDataCodeUse <- shiny::reactive({ - data |> - omopViewer::filterData("code_use", input) |> - CodelistGenerator::tableCodeUse( - header = input$code_use_formatted_8_header, - groupColumn = input$code_use_formatted_8_groupColumn, - hide = input$code_use_formatted_8_hide - ) - }) - output$code_use_formatted_8 <- gt::render_gt({ - getFormattedDataCodeUse() - }) - output$code_use_formatted_download_8 <- shiny::downloadHandler( - filename = function() { - paste0("formatted_code_use.", input$code_use_formatted_download_8_type) - }, - content = function(file) { - getFormattedDataCodeUse() |> - gt::gtsave(filename = file) - } - ) - ## plot code_use ----- - - - # achilles_code_use ----- - ## tidy achilles_code_use ----- - getTidyDataAchillesCodeUse <- shiny::reactive({ - res <- data |> - omopViewer::filterData("achilles_code_use", input) |> - omopViewer::tidyData() - - # columns to eliminate - colsEliminate <- colnames(res) - colsEliminate <- colsEliminate[!colsEliminate %in% c( - input$achilles_code_use_tidy_columns, "variable_name", "variable_level", - "estimate_name", "estimate_type", "estimate_value" - )] - - # pivot - pivot <- input$achilles_code_use_tidy_pivot - if (pivot != "none") { - vars <- switch(pivot, - "estimates" = "estimate_name", - "estimates and variables" = c("variable_name", "variable_level", "estimate_name") - ) - res <- res |> - visOmopResults::pivotEstimates(pivotEstimatesBy = vars) - } - - res |> - dplyr::select(!dplyr::all_of(colsEliminate)) - }) - output$achilles_code_use_tidy <- DT::renderDT({ - DT::datatable( - getTidyDataAchillesCodeUse(), - options = list(scrollX = TRUE), - rownames = FALSE - ) - }) - output$achilles_code_use_tidy_download <- shiny::downloadHandler( - filename = "tidy_achilles_code_use.csv", - content = function(file) { - getTidyDataAchillesCodeUse() |> - readr::write_csv(file = file) - } - ) - ## formatted achilles_code_use ----- - getFormattedDataAchillesCodeUse <- shiny::reactive({ - data |> - omopViewer::filterData("achilles_code_use", input) |> - CodelistGenerator::tableAchillesCodeUse( - header = input$achilles_code_use_formatted_9_header, - groupColumn = input$achilles_code_use_formatted_9_groupColumn, - hide = input$achilles_code_use_formatted_9_hide - ) - }) - output$achilles_code_use_formatted_9 <- gt::render_gt({ - getFormattedDataAchillesCodeUse() - }) - output$achilles_code_use_formatted_download_9 <- shiny::downloadHandler( - filename = function() { - paste0("formatted_achilles_code_use.", input$achilles_code_use_formatted_download_9_type) - }, - content = function(file) { - getFormattedDataAchillesCodeUse() |> - gt::gtsave(filename = file) - } - ) - ## plot achilles_code_use ----- - } - ---- - - Code - cat(global, sep = "\n") - Output - # Generated by omopViewer 0.0.0.900 - # Be careful editing this file - - library(CodelistGenerator) - library(DT) - library(bslib) - library(dplyr) - library(gt) - library(here) - library(omopViewer) - library(readr) - library(shiny) - library(sortable) - library(visOmopResults) - - data <- omopViewer::importSummarisedResult(here::here("data")) |> - omopViewer::correctSettings() - diff --git a/tests/testthat/_snaps/summary.md b/tests/testthat/_snaps/summary.md index d327570..66aa593 100644 --- a/tests/testthat/_snaps/summary.md +++ b/tests/testthat/_snaps/summary.md @@ -39,8 +39,8 @@

Package versions

Inconsistent versions:

    -
  • omopViewer 0.1.0 in result_id(s): 1
  • -
  • omopViewer 0.2.0 in result_id(s): 2
  • +
  • OmopViewer 0.1.0 in result_id(s): 1
  • +
  • OmopViewer 0.2.0 in result_id(s): 2

Consistent versions:

    @@ -54,7 +54,7 @@

    Explore settings

    - + diff --git a/tests/testthat/test-choices.R b/tests/testthat/test-choices.R index 4d7791c..cd63e07 100644 --- a/tests/testthat/test-choices.R +++ b/tests/testthat/test-choices.R @@ -11,7 +11,7 @@ test_that("test getChoices", { res <- emptySummarisedResult(settings = dplyr::tibble( result_id = c(1L, 2L), result_type = resT, - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "1.0.0", param = c(TRUE, NA), x = c(0, 1) @@ -50,7 +50,7 @@ test_that("test getChoices", { settings = dplyr::tibble( result_id = c(1L, 2L), result_type = resT, - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "1.0.0", param = c(TRUE, NA), x = c(0, 1) diff --git a/tests/testthat/test-correctSettings.R b/tests/testthat/test-correctSettings.R index 2647ec5..7449119 100644 --- a/tests/testthat/test-correctSettings.R +++ b/tests/testthat/test-correctSettings.R @@ -34,7 +34,7 @@ test_that("correctSettings columns", { omopgenerics::newSummarisedResult(settings = dplyr::tibble( result_id = 1L, result_type = "toy_data", - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "0.1.0" )) expect_no_error(xCorrected <- correctSettings(x)) @@ -73,7 +73,7 @@ test_that("correctSettings columns", { omopgenerics::newSummarisedResult(settings = dplyr::tibble( result_id = c(1L, 2L), result_type = "toy_data", - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "0.1.0" )) expect_no_error(xCorrected <- correctSettings(x)) @@ -98,7 +98,7 @@ test_that("correctSettings columns", { omopgenerics::newSummarisedResult(settings = dplyr::tibble( result_id = c(1L, 2L, 3L), result_type = "toy_data", - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "0.1.0" )) expect_no_error(xCorrected <- correctSettings(x)) @@ -127,7 +127,7 @@ test_that("correctSettings columns", { omopgenerics::newSummarisedResult(settings = dplyr::tibble( result_id = c(1L, 2L, 3L), result_type = "toy_data", - package_name = "omopViewer", + package_name = "OmopViewer", package_version = "0.1.0", strata = "test" )) diff --git a/tests/testthat/test-summary.R b/tests/testthat/test-summary.R index f5f35bc..778f2bf 100644 --- a/tests/testthat/test-summary.R +++ b/tests/testthat/test-summary.R @@ -24,7 +24,7 @@ test_that("test cardSummary", { omopgenerics::newSummarisedResult(settings = dplyr::tibble( result_id = c(1L, 2L, 3L), result_type = c("counts", "counts", "sums"), - package_name = c("omopViewer", "omopViewer", "omopgenerics"), + package_name = c("OmopViewer", "OmopViewer", "omopgenerics"), package_version = c("0.1.0", "0.2.0", "1.0.0"), min_cell_count = c(NA, 1, 5) )) diff --git a/vignettes/articles/background.Rmd b/vignettes/articles/background.Rmd index a067f0d..b40c3e8 100644 --- a/vignettes/articles/background.Rmd +++ b/vignettes/articles/background.Rmd @@ -16,7 +16,7 @@ knitr::opts_chunk$set( The background panel is triggered when `background = TRUE` argument is used in the `exportStaticApp()` function. If background is set to TRUE a 'background' panel is added and a default 'background.md' file is created. The content of this 'background' panel will be always a card generated with the `cardFromMd()` function using the content of 'background.md'. In this vignette we are going to show different options how to populate the 'background.md' file. ```{r} -library(omopViewer) +library(OmopViewer) ``` ## General markdown behaviour @@ -62,7 +62,7 @@ This shiny *contains information* on: The **ohdsi** logo: ![](', -system.file("logos", "ohdsi_logo.svg", package = "omopViewer"), +system.file("logos", "ohdsi_logo.svg", package = "OmopViewer"), '){width=100px}') tmpFile <- tempfile(fileext = ".md") @@ -95,7 +95,7 @@ The `yaml` metadata can contain two types of information: The following keywords can be used to edit the `bslib::card()` content: ```{r, echo=FALSE} -omopViewer:::backgroundKeywords |> +OmopViewer:::backgroundKeywords |> dplyr::mutate(`function` = purrr::map2(.data$link, .data$fun, \(x, y) { shiny::a(href = x, y) |> as.character() |> diff --git a/vignettes/supported_result_type.Rmd b/vignettes/supported_result_type.Rmd index 1c0eba5..edfea82 100644 --- a/vignettes/supported_result_type.Rmd +++ b/vignettes/supported_result_type.Rmd @@ -1,5 +1,5 @@ --- -title: "Plot tabs in omopViewer" +title: "Plot tabs in OmopViewer" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{supported_result_type} @@ -14,10 +14,10 @@ knitr::opts_chunk$set( ) ``` -The **omopViewer** package supports `r omopViewer:::omopViewerTabs$result_type |> unique() |> length()` different result types of the following packages: +The **OmopViewer** package supports `r OmopViewer:::omopViewerTabs$result_type |> unique() |> length()` different result types of the following packages: ```{r, results='asis', echo=FALSE} -pkgs <- omopViewer:::omopViewerTabs$package |> unique() |> sort() +pkgs <- OmopViewer:::omopViewerTabs$package |> unique() |> sort() for (k in seq_along(pkgs)) { cat(paste0("* ", pkgs[k], "\n")) } @@ -26,9 +26,9 @@ for (k in seq_along(pkgs)) { You can see the plot functions that have been configured in the package per result type in the following table: ```{r, echo = FALSE} -omopViewer:::omopViewerPlots |> +OmopViewer:::omopViewerPlots |> dplyr::inner_join( - omopViewer:::omopViewerTabs, by = "result_tab_id" + OmopViewer:::omopViewerTabs, by = "result_tab_id" ) |> dplyr::select( "Result type" = "result_type", "package", "Plot function" = "fun") |>