From 04784a7a24bbb6a4c0d1da9e4f372b84e11a5e4a Mon Sep 17 00:00:00 2001 From: Andreas Gammelgaard Damsbo Date: Wed, 19 Mar 2025 09:14:36 +0100 Subject: [PATCH] renaming --- DESCRIPTION | 2 +- freesearcheR.Rproj => FreesearchR.Rproj | 2 +- NAMESPACE | 3 +- NEWS.md | 4 +- QA.md | 2 +- R/app_version.R | 2 +- R/import-file-ext.R | 2 +- R/launch_FreesearchR.R | 24 ++++++++++++ R/regression_plot.R | 29 +++++++++------ R/regression_table.R | 4 +- R/shiny_freesearcheR.R | 37 ------------------- R/update-factor-ext.R | 2 +- README.md | 22 +++++------ inst/apps/{freesearcheR => FreesearchR}/app.R | 14 ++----- .../{freesearcheR => FreesearchR}/launch.R | 0 .../shinyapps.io/agdamsbo/freesearcheR.dcf | 2 +- .../shinyapps.io/agdamsbo/webResearch.dcf | 0 .../cognitiveindex/freesearcheR_dev.dcf | 0 .../cognitiveindex/freesearcheR_extra.dcf | 0 .../{freesearcheR => FreesearchR}/server.R | 0 inst/apps/{freesearcheR => FreesearchR}/ui.R | 0 .../www/intro.html | 0 .../www/intro.md | 0 .../www/notes_visuals.html | 0 .../www/notes_visuals.md | 0 .../www/report.rmd | 0 .../www/umami-app.html | 0 man/launch_FreesearchR.Rd | 23 ++++++++++++ man/launch_freesearcheR.Rd | 17 --------- man/plot.tbl_regression.Rd | 10 ++++- man/regression_table.Rd | 2 +- man/shiny_freesearcheR.Rd | 23 ------------ man/update-factor.Rd | 12 ++++++ .../{freesearcheR.Rmd => FreesearchR.Rmd} | 18 ++++----- 34 files changed, 120 insertions(+), 136 deletions(-) rename freesearcheR.Rproj => FreesearchR.Rproj (89%) create mode 100644 R/launch_FreesearchR.R delete mode 100644 R/shiny_freesearcheR.R rename inst/apps/{freesearcheR => FreesearchR}/app.R (99%) rename inst/apps/{freesearcheR => FreesearchR}/launch.R (100%) rename inst/apps/{freesearcheR => FreesearchR}/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf (91%) rename inst/apps/{freesearcheR => FreesearchR}/rsconnect/shinyapps.io/agdamsbo/webResearch.dcf (100%) rename inst/apps/{freesearcheR => FreesearchR}/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_dev.dcf (100%) rename inst/apps/{freesearcheR => FreesearchR}/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_extra.dcf (100%) rename inst/apps/{freesearcheR => FreesearchR}/server.R (100%) rename inst/apps/{freesearcheR => FreesearchR}/ui.R (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/intro.html (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/intro.md (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/notes_visuals.html (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/notes_visuals.md (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/report.rmd (100%) rename inst/apps/{freesearcheR => FreesearchR}/www/umami-app.html (100%) create mode 100644 man/launch_FreesearchR.Rd delete mode 100644 man/launch_freesearcheR.Rd delete mode 100644 man/shiny_freesearcheR.Rd rename vignettes/{freesearcheR.Rmd => FreesearchR.Rmd} (84%) diff --git a/DESCRIPTION b/DESCRIPTION index abdb611..c860889 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,4 +1,4 @@ -Package: freesearcheR +Package: FreesearchR Title: Browser Based Data Analysis Version: 25.3.2 Authors@R: diff --git a/freesearcheR.Rproj b/FreesearchR.Rproj similarity index 89% rename from freesearcheR.Rproj rename to FreesearchR.Rproj index 235efdc..0791dee 100644 --- a/freesearcheR.Rproj +++ b/FreesearchR.Rproj @@ -20,4 +20,4 @@ LineEndingConversion: Posix BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace +PackageRoxygenize: rd,collate,namespace,vignette diff --git a/NAMESPACE b/NAMESPACE index 336ec69..a92a98b 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -48,7 +48,7 @@ export(is_consecutive) export(is_datetime) export(is_valid_redcap_url) export(is_valid_token) -export(launch_freesearcheR) +export(launch_FreesearchR) export(line_break) export(m_datafileUI) export(m_redcap_readServer) @@ -81,7 +81,6 @@ export(remove_na_attr) export(repeated_instruments) export(sankey_ready) export(selectInputIcon) -export(shiny_freesearcheR) export(specify_qmd_format) export(subset_types) export(supported_functions) diff --git a/NEWS.md b/NEWS.md index aee2764..3ef25c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,11 +2,11 @@ Focus is on polish and improved ui/ux. -First steps towards an updated name (will be FreesearchR), with renamed repository. Also, the repo will move to an organisation (named FreesearchR). +First steps towards an updated name (will be FreesearchR), with renamed repository. This may introduce some breaking chances for others calling or installing the package. No future changes are planned. A complete transition is planned before attending and presenting a poster at the European Stroke Organisation COnference 2025 in May. Testing file upload conducted and improved. -Working on omproving code export. +Working on improving code export. # freesearcheR 25.3.1 diff --git a/QA.md b/QA.md index 8317ecf..c17abf4 100644 --- a/QA.md +++ b/QA.md @@ -1,6 +1,6 @@ # Questions and answers -A complete instructions set is not available, but below are a collection of questions and answers about the project and use of the app. +A complete instructions set [is also available](https://agdamsbo.github.io/FreesearchR/articles/FreesearchR.html), but below are a collection of questions and answers about the project and use of the ***FreesearchR*** app. ## Are you keeping the uploaded data? diff --git a/R/app_version.R b/R/app_version.R index 131837e..05f35bb 100644 --- a/R/app_version.R +++ b/R/app_version.R @@ -1 +1 @@ -app_version <- function()'250318_0819' +app_version <- function()'250318_0827' diff --git a/R/import-file-ext.R b/R/import-file-ext.R index 05ac7b6..e93809a 100644 --- a/R/import-file-ext.R +++ b/R/import-file-ext.R @@ -254,7 +254,7 @@ import_file_server <- function(id, parameters <- parameters[which(names(parameters) %in% rlang::fn_fmls_names(get(read_fns[[extension]])))] # parameters <- parameters[which(names(parameters) %in% rlang::fn_fmls_names(read_fns[[extension]]))] imported <- try(rlang::exec(read_fns[[extension]], !!!parameters), silent = TRUE) - code <- rlang::call2(read_fns[[extension]], !!!modifyList(parameters, list(file = input$file$name)), .ns = "freesearcheR") + code <- rlang::call2(read_fns[[extension]], !!!modifyList(parameters, list(file = input$file$name)), .ns = "FreesearchR") if (inherits(imported, "try-error")) { imported <- try(rlang::exec(rio::import, !!!parameters[1]), silent = TRUE) diff --git a/R/launch_FreesearchR.R b/R/launch_FreesearchR.R new file mode 100644 index 0000000..5d22820 --- /dev/null +++ b/R/launch_FreesearchR.R @@ -0,0 +1,24 @@ +#' Easily launch the FreesearchR app +#' +#' @description +#' All data.frames in the global environment will be accessible through the app. +#' +#' @param ... passed on to `shiny::runApp()` +#' +#' @returns shiny app +#' @export +#' +#' @examples +#' \dontrun{ +#' data(mtcars) +#' shiny_FreesearchR(launch.browser = TRUE) +#' } +launch_FreesearchR <- function(...){ + appDir <- system.file("apps", "FreesearchR", package = "FreesearchR") + if (appDir == "") { + stop("Could not find the app directory. Try re-installing `FreesearchR`.", call. = FALSE) + } + + a <- shiny::runApp(appDir = paste0(appDir,"/app.R"), ...) + return(invisible(a)) +} diff --git a/R/regression_plot.R b/R/regression_plot.R index 689b896..d44a81c 100644 --- a/R/regression_plot.R +++ b/R/regression_plot.R @@ -15,15 +15,16 @@ #' #' @examples #' \dontrun{ -#' mod <- lm(mpg ~ ., mtcars) +#' mod <- lm(mpg ~ ., default_parsing(mtcars)) #' p <- mod |> #' gtsummary::tbl_regression() |> #' plot(colour = "variable") #' } #' plot.tbl_regression <- function(x, - # remove_header_rows = TRUE, - # remove_reference_rows = FALSE, + plot_ref = TRUE, + remove_header_rows = TRUE, + remove_reference_rows = FALSE, ...) { # check_dots_empty() gtsummary:::check_pkg_installed("ggstats") @@ -32,18 +33,22 @@ plot.tbl_regression <- function(x, # gtsummary:::check_scalar_logical(remove_reference_rows) df_coefs <- x$table_body - # if (isTRUE(remove_header_rows)) { - # df_coefs <- df_coefs |> dplyr::filter(!.data$header_row %in% TRUE) - # } - # if (isTRUE(remove_reference_rows)) { - # df_coefs <- df_coefs |> dplyr::filter(!.data$reference_row %in% TRUE) - # } - - # browser() + browser() + if (isTRUE(remove_header_rows)) { + df_coefs <- df_coefs |> dplyr::filter(!header_row %in% TRUE) + } + if (isTRUE(remove_reference_rows)) { + df_coefs <- df_coefs |> dplyr::filter(!reference_row %in% TRUE) + } + # Removes redundant label df_coefs$label[df_coefs$row_type == "label"] <- "" - df_coefs %>% + # Add estimate value to reference level + if (plot_ref == TRUE){ + df_coefs[df_coefs$var_type == "categorical" & is.na(df_coefs$reference_row),"estimate"] <- if (x$inputs$exponentiate) 1 else 0} + + df_coefs |> ggstats::ggcoef_plot(exponentiate = x$inputs$exponentiate, ...) } diff --git a/R/regression_table.R b/R/regression_table.R index 2b916e0..c9fa513 100644 --- a/R/regression_table.R +++ b/R/regression_table.R @@ -81,7 +81,7 @@ #' #' @export #' regression_table.default <- function(x, ..., args.list = NULL, fun = "gtsummary::tbl_regression") { #' # Stripping custom class -#' class(x) <- class(x)[class(x) != "freesearcher_model"] +#' class(x) <- class(x)[class(x) != "freesearchr_model"] #' #' if (any(c(length(class(x)) != 1, class(x) != "lm"))) { #' if (!"exponentiate" %in% names(args.list)) { @@ -110,7 +110,7 @@ regression_table <- function(x, ...) { regression_table_create <- function(x, ..., args.list = NULL, fun = "gtsummary::tbl_regression") { # Stripping custom class - class(x) <- class(x)[class(x) != "freesearcher_model"] + class(x) <- class(x)[class(x) != "freesearchr_model"] if (any(c(length(class(x)) != 1, class(x) != "lm"))) { if (!"exponentiate" %in% names(args.list)) { diff --git a/R/shiny_freesearcheR.R b/R/shiny_freesearcheR.R deleted file mode 100644 index 337376b..0000000 --- a/R/shiny_freesearcheR.R +++ /dev/null @@ -1,37 +0,0 @@ -#' Launch the freesearcheR tool locally -#' -#' @description -#' All data.frames in the global environment will be accessible through the app. -#' -#' -#' @param ... arguments passed on to `shiny::runApp()` -#' -#' @return shiny app -#' @export -#' -#' @examples -#' \dontrun{ -#' data(mtcars) -#' shiny_freesearcheR(launch.browser = TRUE) -#' } -shiny_freesearcheR <- function(...) { - appDir <- system.file("apps", "freesearcheR", package = "freesearcheR") - if (appDir == "") { - stop("Could not find the app directory. Try re-installing `freesearcheR`.", call. = FALSE) - } - - a <- shiny::runApp(appDir = paste0(appDir,"/app.R"), ...) - return(invisible(a)) -} - - -#' Easily launch the freesearcheR app -#' -#' @param ... passed on to `shiny::runApp()` -#' -#' @returns shiny app -#' @export -#' -launch_freesearcheR <- function(...){ - shiny_freesearcheR(...) -} diff --git a/R/update-factor-ext.R b/R/update-factor-ext.R index 07dc284..a394349 100644 --- a/R/update-factor-ext.R +++ b/R/update-factor-ext.R @@ -265,7 +265,7 @@ modal_update_factor <- function(id, #' #' @importFrom shinyWidgets WinBox wbOptions wbControls #' @importFrom htmltools tagList -#' @rdname create-column +#' @rdname update-factor winbox_update_factor <- function(id, title = i18n("Update levels of a factor"), options = shinyWidgets::wbOptions(), diff --git a/README.md b/README.md index 4690ce5..5a980b8 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ -# freesearcheR +# FreesearchR [![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) -[![rhub](https://github.com/agdamsbo/freesearcheR/actions/workflows/rhub.yaml/badge.svg)](https://github.com/agdamsbo/freesearcheR/actions/workflows/rhub.yaml) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14527429.svg)](https://doi.org/10.5281/zenodo.14527429) -[![freesearcheR](https://img.shields.io/badge/Shiny-shinyapps.io-blue?style=flat&labelColor=white&logo=RStudio&logoColor=blue)](https://agdamsbo.shinyapps.io/freesearcheR/) +[![rhub](https://github.com/agdamsbo/FreesearchR/actions/workflows/rhub.yaml/badge.svg)](https://github.com/agdamsbo/FreesearchR/actions/workflows/rhub.yaml) +[![FreesearchR](https://img.shields.io/badge/Shiny-shinyapps.io-blue?style=flat&labelColor=white&logo=RStudio&logoColor=blue)](https://agdamsbo.shinyapps.io/freesearcheR/) -This package is the backbone of the ***freesearcheR***, a free and open-source browser based data exploration and analysis tool for clinicians and researchers with publication ready output. +This package is the backbone of the ***FreesearchR***, a free and open-source browser based data exploration and analysis tool for clinicians and researchers with publication ready output. -This package and the ***freesearcheR***-tool is part of a larger initiative to democratize health data analysis and remove barriers for clinicians to engage in health research. +This package and the ***FreesearchR***-tool is part of a larger initiative to democratize health data analysis and remove barriers for clinicians to engage in health research. -the ***freesearcheR***-tool is online and accessible here: [link to the app freely hosted on shinyapps.io](https://agdamsbo.shinyapps.io/freesearcheR/). All feedback is welcome and can be shared as a GitHub issue. +the ***FreesearchR***-tool is online and accessible here: [link to the app freely hosted on shinyapps.io](https://agdamsbo.shinyapps.io/FreesearchR/). All feedback is welcome and can be shared as a GitHub issue. Initiatives for funding continued development of the tool and surrounding initiatives is ongoing. ## Install locally -The ***freesearcheR***-tool can also be launched locally. Any data.frame available in the global environment will be accessible from the interface. +The ***FreesearchR***-tool can also be launched locally. Any data.frame available in the global environment will be accessible from the interface. ``` require("devtools") -devtools::install_github("agdamsbo/freesearcheR") -library(freesearcheR) +devtools::install_github("agdamsbo/FreesearchR") +library(FreesearchR) # By loading mtcars to the environment, it will be available # in the interface like any other data.frame data(mtcars) -shiny_freesearcheR() +launch_FreesearchR() ``` ## Code of Conduct -Please note that the freesearcheR project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. +Please note that the ***FreesearchR*** project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. diff --git a/inst/apps/freesearcheR/app.R b/inst/apps/FreesearchR/app.R similarity index 99% rename from inst/apps/freesearcheR/app.R rename to inst/apps/FreesearchR/app.R index 2e673b3..df1d5c7 100644 --- a/inst/apps/freesearcheR/app.R +++ b/inst/apps/FreesearchR/app.R @@ -10,7 +10,7 @@ #### Current file: R//app_version.R ######## -app_version <- function()'250318_0819' +app_version <- function()'250318_0827' ######## @@ -7214,7 +7214,8 @@ ui_elements <- list( ), shiny::br(), shiny::br(), - shiny::tags$b("Code snippets:"), + shiny::h4("Code snippets"), + shiny::tags$p("Below are the code used to create the final data set. This can be saved for reproducibility. The code may not be 100 % correct, but kan be used for learning and example code to get started on coding yourself."), shiny::verbatimTextOutput(outputId = "code_import"), shiny::verbatimTextOutput(outputId = "code_data"), shiny::verbatimTextOutput(outputId = "code_filter"), @@ -7535,11 +7536,6 @@ server <- function(input, output, session) { ) }) - # shiny::observeEvent(input$reset_confirm, { - # rv$data <- rv$data_original |> default_parsing() - # }) - - ######### ######### Modifications @@ -7612,7 +7608,6 @@ server <- function(input, output, session) { } ) - ######### Subset, rename, reclass updated_data <- update_variables_server( @@ -7626,8 +7621,6 @@ server <- function(input, output, session) { rv$code$modify[[length(rv$code$modify) + 1]] <- attr(rv$data, "code") }) - - ######### Data filter # IDEAFilter has the least cluttered UI, but might have a License issue data_filter <- IDEAFilter::IDEAFilter("data_filter", @@ -7765,7 +7758,6 @@ server <- function(input, output, session) { }) output$code_filter <- shiny::renderPrint({ - shiny::req(rv$code$filter) cat(rv$code$filter) }) diff --git a/inst/apps/freesearcheR/launch.R b/inst/apps/FreesearchR/launch.R similarity index 100% rename from inst/apps/freesearcheR/launch.R rename to inst/apps/FreesearchR/launch.R diff --git a/inst/apps/freesearcheR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf b/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf similarity index 91% rename from inst/apps/freesearcheR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf rename to inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf index 4699504..76ab242 100644 --- a/inst/apps/freesearcheR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf +++ b/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/freesearcheR.dcf @@ -5,6 +5,6 @@ account: agdamsbo server: shinyapps.io hostUrl: https://api.shinyapps.io/v1 appId: 13611288 -bundleId: 9958862 +bundleId: 9961770 url: https://agdamsbo.shinyapps.io/freesearcheR/ version: 1 diff --git a/inst/apps/freesearcheR/rsconnect/shinyapps.io/agdamsbo/webResearch.dcf b/inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/webResearch.dcf similarity index 100% rename from inst/apps/freesearcheR/rsconnect/shinyapps.io/agdamsbo/webResearch.dcf rename to inst/apps/FreesearchR/rsconnect/shinyapps.io/agdamsbo/webResearch.dcf diff --git a/inst/apps/freesearcheR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_dev.dcf b/inst/apps/FreesearchR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_dev.dcf similarity index 100% rename from inst/apps/freesearcheR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_dev.dcf rename to inst/apps/FreesearchR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_dev.dcf diff --git a/inst/apps/freesearcheR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_extra.dcf b/inst/apps/FreesearchR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_extra.dcf similarity index 100% rename from inst/apps/freesearcheR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_extra.dcf rename to inst/apps/FreesearchR/rsconnect/shinyapps.io/cognitiveindex/freesearcheR_extra.dcf diff --git a/inst/apps/freesearcheR/server.R b/inst/apps/FreesearchR/server.R similarity index 100% rename from inst/apps/freesearcheR/server.R rename to inst/apps/FreesearchR/server.R diff --git a/inst/apps/freesearcheR/ui.R b/inst/apps/FreesearchR/ui.R similarity index 100% rename from inst/apps/freesearcheR/ui.R rename to inst/apps/FreesearchR/ui.R diff --git a/inst/apps/freesearcheR/www/intro.html b/inst/apps/FreesearchR/www/intro.html similarity index 100% rename from inst/apps/freesearcheR/www/intro.html rename to inst/apps/FreesearchR/www/intro.html diff --git a/inst/apps/freesearcheR/www/intro.md b/inst/apps/FreesearchR/www/intro.md similarity index 100% rename from inst/apps/freesearcheR/www/intro.md rename to inst/apps/FreesearchR/www/intro.md diff --git a/inst/apps/freesearcheR/www/notes_visuals.html b/inst/apps/FreesearchR/www/notes_visuals.html similarity index 100% rename from inst/apps/freesearcheR/www/notes_visuals.html rename to inst/apps/FreesearchR/www/notes_visuals.html diff --git a/inst/apps/freesearcheR/www/notes_visuals.md b/inst/apps/FreesearchR/www/notes_visuals.md similarity index 100% rename from inst/apps/freesearcheR/www/notes_visuals.md rename to inst/apps/FreesearchR/www/notes_visuals.md diff --git a/inst/apps/freesearcheR/www/report.rmd b/inst/apps/FreesearchR/www/report.rmd similarity index 100% rename from inst/apps/freesearcheR/www/report.rmd rename to inst/apps/FreesearchR/www/report.rmd diff --git a/inst/apps/freesearcheR/www/umami-app.html b/inst/apps/FreesearchR/www/umami-app.html similarity index 100% rename from inst/apps/freesearcheR/www/umami-app.html rename to inst/apps/FreesearchR/www/umami-app.html diff --git a/man/launch_FreesearchR.Rd b/man/launch_FreesearchR.Rd new file mode 100644 index 0000000..5e1e590 --- /dev/null +++ b/man/launch_FreesearchR.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/launch_FreesearchR.R +\name{launch_FreesearchR} +\alias{launch_FreesearchR} +\title{Easily launch the FreesearchR app} +\usage{ +launch_FreesearchR(...) +} +\arguments{ +\item{...}{passed on to \code{shiny::runApp()}} +} +\value{ +shiny app +} +\description{ +All data.frames in the global environment will be accessible through the app. +} +\examples{ +\dontrun{ +data(mtcars) +shiny_FreesearchR(launch.browser = TRUE) +} +} diff --git a/man/launch_freesearcheR.Rd b/man/launch_freesearcheR.Rd deleted file mode 100644 index 7ec99f8..0000000 --- a/man/launch_freesearcheR.Rd +++ /dev/null @@ -1,17 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/shiny_freesearcheR.R -\name{launch_freesearcheR} -\alias{launch_freesearcheR} -\title{Easily launch the freesearcheR app} -\usage{ -launch_freesearcheR(...) -} -\arguments{ -\item{...}{passed on to \code{shiny::runApp()}} -} -\value{ -shiny app -} -\description{ -Easily launch the freesearcheR app -} diff --git a/man/plot.tbl_regression.Rd b/man/plot.tbl_regression.Rd index 3c5d7db..daa741a 100644 --- a/man/plot.tbl_regression.Rd +++ b/man/plot.tbl_regression.Rd @@ -4,7 +4,13 @@ \alias{plot.tbl_regression} \title{Regression coef plot from gtsummary. Slightly modified to pass on arguments} \usage{ -\method{plot}{tbl_regression}(x, ...) +\method{plot}{tbl_regression}( + x, + plot_ref = TRUE, + remove_header_rows = TRUE, + remove_reference_rows = FALSE, + ... +) } \arguments{ \item{x}{(\code{tbl_regression}, \code{tbl_uvregression})\cr @@ -20,7 +26,7 @@ Regression coef plot from gtsummary. Slightly modified to pass on arguments } \examples{ \dontrun{ -mod <- lm(mpg ~ ., mtcars) +mod <- lm(mpg ~ ., default_parsing(mtcars)) p <- mod |> gtsummary::tbl_regression() |> plot(colour = "variable") diff --git a/man/regression_table.Rd b/man/regression_table.Rd index 1fdc188..71d5238 100644 --- a/man/regression_table.Rd +++ b/man/regression_table.Rd @@ -93,7 +93,7 @@ regression_table.list <- function(x, ...) { #' @export regression_table.default <- function(x, ..., args.list = NULL, fun = "gtsummary::tbl_regression") { # Stripping custom class - class(x) <- class(x)[class(x) != "freesearcher_model"] + class(x) <- class(x)[class(x) != "freesearchr_model"] if (any(c(length(class(x)) != 1, class(x) != "lm"))) { if (!"exponentiate" \%in\% names(args.list)) { diff --git a/man/shiny_freesearcheR.Rd b/man/shiny_freesearcheR.Rd deleted file mode 100644 index 93d8707..0000000 --- a/man/shiny_freesearcheR.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/shiny_freesearcheR.R -\name{shiny_freesearcheR} -\alias{shiny_freesearcheR} -\title{Launch the freesearcheR tool locally} -\usage{ -shiny_freesearcheR(...) -} -\arguments{ -\item{...}{arguments passed on to \code{shiny::runApp()}} -} -\value{ -shiny app -} -\description{ -All data.frames in the global environment will be accessible through the app. -} -\examples{ -\dontrun{ -data(mtcars) -shiny_freesearcheR(launch.browser = TRUE) -} -} diff --git a/man/update-factor.Rd b/man/update-factor.Rd index 8f55a58..c5810be 100644 --- a/man/update-factor.Rd +++ b/man/update-factor.Rd @@ -5,6 +5,7 @@ \alias{update_factor_ui} \alias{update_factor_server} \alias{modal_update_factor} +\alias{winbox_update_factor} \title{Module to Reorder the Levels of a Factor Variable} \usage{ update_factor_ui(id) @@ -18,6 +19,13 @@ modal_update_factor( size = "l", footer = NULL ) + +winbox_update_factor( + id, + title = i18n("Update levels of a factor"), + options = shinyWidgets::wbOptions(), + controls = shinyWidgets::wbControls() +) } \arguments{ \item{id}{Module ID.} @@ -39,6 +47,10 @@ pass \code{\link[bslib:bs_theme]{bslib::bs_theme()}} to the \code{theme} argumen like \code{\link[shiny:fluidPage]{fluidPage()}}).} \item{footer}{UI for footer. Use \code{NULL} for no footer.} + +\item{options}{List of options, see \code{\link[shinyWidgets:wbOptions]{wbOptions()}}.} + +\item{controls}{List of controls, see \code{\link[shinyWidgets:wbControls]{wbControls()}}.} } \value{ A \code{\link[shiny:reactive]{shiny::reactive()}} function returning the data. diff --git a/vignettes/freesearcheR.Rmd b/vignettes/FreesearchR.Rmd similarity index 84% rename from vignettes/freesearcheR.Rmd rename to vignettes/FreesearchR.Rmd index 566cc95..86ea6ec 100644 --- a/vignettes/freesearcheR.Rmd +++ b/vignettes/FreesearchR.Rmd @@ -1,8 +1,8 @@ --- -title: "freesearcheR" +title: "FreesearchR" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{freesearcheR} + %\VignetteIndexEntry{FreesearchR} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -11,9 +11,9 @@ vignette: > knitr::opts_chunk$set(echo = TRUE,eval = FALSE) ``` -# Getting started with ***freesearcheR*** +# Getting started with ***FreesearchR*** -Below is a simple walk-trough and basic instructions for the functions on the freesearcheR app. +Below is a simple walk-trough and basic instructions for the functions on the FreesearchR app. ## Launching @@ -21,13 +21,13 @@ The easiest way to get started is to launch [the hosted version of the app on sh Additionally you have the option to run the app locally with access to any data in your current working environment. -To do this, open *R* (or RStudio or similar), and run the following code to install the latest version of ***freesearcheR*** and launch the app: +To do this, open *R* (or RStudio or similar), and run the following code to install the latest version of ***FreesearchR*** and launch the app: -``` {r} +```{r} require("pak") -pak::pak("agdamsbo/freesearcheR") -library(freesearcheR) -freesearcheR::launch_freesearcheR() +pak::pak("agdamsbo/FreesearchR") +library(FreesearchR) +FreesearchR::launch_FreesearchR() ``` As a small note, a standalone Windows app version is on the drawing board as well, but no time frame is available.