diff --git a/CITATION.cff b/CITATION.cff index 267f39b..7c81352 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -99,7 +99,7 @@ references: abstract: 'mwana: An Efficient Workflow for Plausibility Checks and Prevalence Analysis of Wasting in R' notes: Imports - url: https://nutriverse.io/mwana + url: https://mphimo.github.io/mwana/ authors: - family-names: Zaba given-names: Tomás @@ -111,7 +111,7 @@ references: - family-names: Myatt given-names: Mark year: '2025' - version: '>= 1.0.0' + version: '>= 0.2.3' - type: software title: withr abstract: 'withr: Run Code ''With'' Temporarily Modified Global State' @@ -193,6 +193,10 @@ references: given-names: Barret email: barret@posit.co orcid: https://orcid.org/0000-0001-9986-114X + - family-names: Aden-Buie + given-names: Garrick + email: garrick@adenbuie.com + orcid: https://orcid.org/0000-0002-7111-0077 - family-names: Xie given-names: Yihui email: yihui@posit.co diff --git a/DESCRIPTION b/DESCRIPTION index dc64f9e..5cadeea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,7 +22,7 @@ Imports: dplyr (>= 1.1.4), rlang (>= 1.1.6), rsatscan (>= 1.0.9), - mwana (>= 1.0.0), + mwana (>= 0.2.3), withr (>= 3.0.2), stringr (>= 1.5.1), tibble (>= 3.3.0), @@ -41,7 +41,7 @@ Suggests: spelling (>= 2.3.1), testthat (>= 3.0.0) Remotes: - nutriverse/mwana + mphimo/mwana Config/testthat/edition: 3 Depends: R (>= 4.1.0) diff --git a/R/data-wranglers.R b/R/data-wranglers.R index c298b47..228ed11 100644 --- a/R/data-wranglers.R +++ b/R/data-wranglers.R @@ -59,7 +59,7 @@ wrangle_data <- function( #' readable by the software, and placed in a directory it can access. #' #' `ww_wrangle_data()` is a convenient function designed for this task. It -#' assumes that the input anthropometric data has been pre-processed using the +#' assumes that the input anthropometric data has been pre-processed using #' `{mwana}` data wrangling functions. #' #' @param .data A data frame object that has been wrangled using @@ -84,7 +84,7 @@ wrangle_data <- function( #' variable must be named "latitude". #' #' @returns -#' Three files are created and saved in the user-defined directory as specifiie +#' Three files are created and saved in the user-defined directory as specified #' in the `dir` argument: a `.cas` file for cases, a `.ctl` for controls, and #' a `.geo` file for geographical coordinates. The full filenames will incorporate #' the use-defined `filename` string. @@ -117,7 +117,7 @@ wrangle_data <- function( #' mwana::define_wasting( #' zscores = wfhz, #' .by = "zscores", -#' edema = oedema +#' oedema = oedema #' ) #' #' ## Apply the function ---- diff --git a/R/module-data-wrangling.R b/R/module-data-wrangling.R index d3b7203..d791d6c 100644 --- a/R/module-data-wrangling.R +++ b/R/module-data-wrangling.R @@ -134,7 +134,7 @@ module_server_wrangle_data <- function(id, data) { ), shiny::selectInput( inputId = ns("oedema"), - label = htmltools::tags$span("Oedema", + label = htmltools::tags$span("oedema", style = "font-size: 14px; font-weight: bold;" ), choices = c("", cols) @@ -174,7 +174,7 @@ module_server_wrangle_data <- function(id, data) { ), shiny::selectInput( inputId = ns("oedema"), - label = htmltools::tags$span("Oedema", + label = htmltools::tags$span("oedema", style = "font-size: 14px; font-weight: bold;" ), choices = c("", cols) @@ -234,7 +234,7 @@ module_server_wrangle_data <- function(id, data) { ), shiny::selectInput( inputId = ns("oedema"), - label = htmltools::tags$span("Oedema", + label = htmltools::tags$span("oedema", style = "font-size: 14px; font-weight: bold;" ), choices = c("", cols) @@ -303,7 +303,7 @@ module_server_wrangle_data <- function(id, data) { mwana::define_wasting( zscores = .data$wfhz, .by = "zscores", - edema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL + oedema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL ) }, "muac" = { @@ -332,7 +332,7 @@ module_server_wrangle_data <- function(id, data) { mwana::define_wasting( muac = .data$muac, .by = "muac", - edema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL + oedema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL ) }, "combined" = { @@ -372,7 +372,7 @@ module_server_wrangle_data <- function(id, data) { zscores = .data$wfhz, muac = .data$muac, .by = "combined", - edema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL + oedema = if (input$oedema != "") !!rlang::sym(input$oedema) else NULL ) } ) diff --git a/R/satscan-configuration.R b/R/satscan-configuration.R index 6cc8da3..2dc4dc8 100644 --- a/R/satscan-configuration.R +++ b/R/satscan-configuration.R @@ -51,7 +51,7 @@ #' mwana::define_wasting( #' zscores = wfhz, #' .by = "zscores", -#' edema = oedema +#' oedema = oedema #' ) #' #' ## Apply the function ---- diff --git a/R/satscan-runner.R b/R/satscan-runner.R index 63cc81b..1bb5ce7 100644 --- a/R/satscan-runner.R +++ b/R/satscan-runner.R @@ -94,7 +94,7 @@ #' mwana::define_wasting( #' zscores = wfhz, #' .by = "zscores", -#' edema = oedema +#' oedema = oedema #' ) #' #' #' ## Given a temporary directory ---- diff --git a/inst/WORDLIST b/inst/WORDLIST index 3368ca1..bf1a89f 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -19,4 +19,5 @@ muac satscan shapefiles tibble +walkthrough ️ diff --git a/inst/app/ui.R b/inst/app/ui.R index 14b2685..c9faf0b 100644 --- a/inst/app/ui.R +++ b/inst/app/ui.R @@ -43,7 +43,7 @@ ui <- tagList( ), ### Right side of the page navigation bar ---- - tags$span("v.1.0.1", + tags$span("v1.0.1", id = "app-version", style = "font-size: 12.5px; color: rgba(31, 42, 68, 0.58); position: fixed; top: 40px; right: 20px;" diff --git a/man/ww_configure_satscan.Rd b/man/ww_configure_satscan.Rd index 0e3cdb9..cbfa38a 100644 --- a/man/ww_configure_satscan.Rd +++ b/man/ww_configure_satscan.Rd @@ -58,7 +58,7 @@ x <- anthro |> mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ## Apply the function ---- diff --git a/man/ww_run_satscan.Rd b/man/ww_run_satscan.Rd index 7200bcb..a16f003 100644 --- a/man/ww_run_satscan.Rd +++ b/man/ww_run_satscan.Rd @@ -115,7 +115,7 @@ x <- anthro |> mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) #' ## Given a temporary directory ---- diff --git a/man/ww_wrangle_data.Rd b/man/ww_wrangle_data.Rd index e59aba2..1eb7466 100644 --- a/man/ww_wrangle_data.Rd +++ b/man/ww_wrangle_data.Rd @@ -37,7 +37,7 @@ are identified, and for which should be excluded from the analysis. Defaults to \code{wfhz}.} } \value{ -Three files are created and saved in the user-defined directory as specifiie +Three files are created and saved in the user-defined directory as specified in the \code{dir} argument: a \code{.cas} file for cases, a \code{.ctl} for controls, and a \code{.geo} file for geographical coordinates. The full filenames will incorporate the use-defined \code{filename} string. @@ -58,7 +58,7 @@ into cases, controls, and geographical coordinates files, then saved in a format readable by the software, and placed in a directory it can access. \code{ww_wrangle_data()} is a convenient function designed for this task. It -assumes that the input anthropometric data has been pre-processed using the +assumes that the input anthropometric data has been pre-processed using \code{{mwana}} data wrangling functions. } \examples{ @@ -79,7 +79,7 @@ x <- anthro |> mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ## Apply the function ---- diff --git a/tests/testthat/test-data-wranglers.R b/tests/testthat/test-data-wranglers.R index 393daa1..9409f05 100644 --- a/tests/testthat/test-data-wranglers.R +++ b/tests/testthat/test-data-wranglers.R @@ -24,7 +24,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ## Observed results ---- @@ -69,7 +69,7 @@ testthat::test_that( .to = "cm" ) |> dplyr::mutate(muac = mwana::recode_muac(muac, .to = "mm")) |> - mwana::define_wasting(muac = muac, .by = "muac", edema = oedema) + mwana::define_wasting(muac = muac, .by = "muac", oedema = oedema) ## Observed results ---- @@ -124,7 +124,7 @@ testthat::test_that( zscores = wfhz, muac = muac, .by = "combined", - edema = oedema + oedema = oedema ) ### Observed results ---- @@ -172,7 +172,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- diff --git a/tests/testthat/test-satscan-configuration.R b/tests/testthat/test-satscan-configuration.R index 3889189..d4b9fc0 100644 --- a/tests/testthat/test-satscan-configuration.R +++ b/tests/testthat/test-satscan-configuration.R @@ -24,7 +24,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- diff --git a/tests/testthat/test-satscan-runner.R b/tests/testthat/test-satscan-runner.R index a731397..e1f1b5d 100644 --- a/tests/testthat/test-satscan-runner.R +++ b/tests/testthat/test-satscan-runner.R @@ -26,7 +26,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- @@ -94,7 +94,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- @@ -166,7 +166,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 4e9e43c..a1f4a6c 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -23,7 +23,7 @@ testthat::test_that( mwana::define_wasting( zscores = wfhz, .by = "zscores", - edema = oedema + oedema = oedema ) ### Create a temporary directory ---- diff --git a/vignettes/how-to-use-wowi.qmd b/vignettes/how-to-use-wowi.qmd index 96f974e..d279643 100644 --- a/vignettes/how-to-use-wowi.qmd +++ b/vignettes/how-to-use-wowi.qmd @@ -63,7 +63,7 @@ The output described in point 4 offers an IPC Acute Malnutrition-related insight ## From data to clusters - the wowi analysis workflow -The analysis workflow with `wowi` begins with the standard anthropometric data processing steps - data wrangling and quality checks. For this purpose, wowi relies on the [`mwana`](https://nutriverse.io/mwana/dev/) package, which will be installed or updated automatically when you install `wowi`. Moreover, in the downstream analysis workflow, the `sf` package is required to generate shapefile-related outputs. Note that [`sf`](https://r-spatial.github.io/sf/) is not installed with wowi, therefore you must install it separately. +The analysis workflow with `wowi` begins with the standard anthropometric data processing steps - data wrangling and quality checks. For this purpose, wowi relies on the [`mwana`](https://https://mphimo.github.io/mwana/) package, which will be installed or updated automatically when you install `wowi`. Moreover, in the downstream analysis workflow, the `sf` package is required to generate shapefile-related outputs. Note that [`sf`](https://r-spatial.github.io/sf/) is not installed with wowi, therefore you must install it separately. ::: {.callout-note} @@ -106,7 +106,7 @@ a <- anthro |> ) |> define_wasting( zscores = wfhz, - edema = oedema, + oedema = oedema, .by = "zscores" ) |> dplyr::rename( @@ -115,7 +115,7 @@ a <- anthro |> ) ``` -Hereafter, you can check the quality of the data. Learn how to do so [here](https://nutriverse.io/mwana/dev/articles/plausibility.html). +Hereafter, you can check the quality of the data. Learn how to do so [here](https://https://mphimo.github.io/mwana/articles/plausibility.html). ### Running the spatial scan