Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestguevarra committed Feb 22, 2024
1 parent cdbd2b8 commit a88a1f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-muac-prevalence.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ muac_prevalence <- ipc_muac_check(


testthat::expect_type(muac_prevalence, "double")


muac_prevalence <- muac_data |>
dplyr::mutate(sex = ifelse(sex == 1, "m", "f")) |>
ipc_muac_check(
sex_recode = c("m", "f"), muac_units = "cm",
oedema_recode = c(1, 2), .summary = FALSE
) |>
ipc_calculate_prevalence(status = "mam")


testthat::expect_type(muac_prevalence, "double")

0 comments on commit a88a1f5

Please sign in to comment.