Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions R/data-wranglers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -117,7 +117,7 @@ wrangle_data <- function(
#' mwana::define_wasting(
#' zscores = wfhz,
#' .by = "zscores",
#' edema = oedema
#' oedema = oedema
#' )
#'
#' ## Apply the function ----
Expand Down
12 changes: 6 additions & 6 deletions R/module-data-wrangling.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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" = {
Expand Down Expand Up @@ -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" = {
Expand Down Expand Up @@ -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
)
}
)
Expand Down
2 changes: 1 addition & 1 deletion R/satscan-configuration.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#' mwana::define_wasting(
#' zscores = wfhz,
#' .by = "zscores",
#' edema = oedema
#' oedema = oedema
#' )
#'
#' ## Apply the function ----
Expand Down
2 changes: 1 addition & 1 deletion R/satscan-runner.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
#' mwana::define_wasting(
#' zscores = wfhz,
#' .by = "zscores",
#' edema = oedema
#' oedema = oedema
#' )
#'
#' #' ## Given a temporary directory ----
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ muac
satscan
shapefiles
tibble
walkthrough
2 changes: 1 addition & 1 deletion inst/app/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
Expand Down
2 changes: 1 addition & 1 deletion man/ww_configure_satscan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ww_run_satscan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/ww_wrangle_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tests/testthat/test-data-wranglers.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

## Observed results ----
Expand Down Expand Up @@ -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 ----
Expand Down Expand Up @@ -124,7 +124,7 @@ testthat::test_that(
zscores = wfhz,
muac = muac,
.by = "combined",
edema = oedema
oedema = oedema
)

### Observed results ----
Expand Down Expand Up @@ -172,7 +172,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-satscan-configuration.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-satscan-runner.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down Expand Up @@ -94,7 +94,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down Expand Up @@ -166,7 +166,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testthat::test_that(
mwana::define_wasting(
zscores = wfhz,
.by = "zscores",
edema = oedema
oedema = oedema
)

### Create a temporary directory ----
Expand Down
6 changes: 3 additions & 3 deletions vignettes/how-to-use-wowi.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -106,7 +106,7 @@ a <- anthro |>
) |>
define_wasting(
zscores = wfhz,
edema = oedema,
oedema = oedema,
.by = "zscores"
) |>
dplyr::rename(
Expand All @@ -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

Expand Down
Loading