diff --git a/DESCRIPTION b/DESCRIPTION index f291785..bd7c7da 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,7 +9,7 @@ Authors@R: c( person("Pascale", "Fritsch", role = "aut"), person("Katja", "Siling", role = "aut")) Description: An implementation of the Rapid Assessment Method for Older People - or RAM-OP . + or RAM-OP . It provides various functions that allow the user to design and plan the assessment and analyse the collected data. RAM-OP provides accurate and reliable estimates of the needs of older people. The method uses simple diff --git a/R/00-oldr.R b/R/00-oldr.R index edfbf72..f8540db 100644 --- a/R/00-oldr.R +++ b/R/00-oldr.R @@ -2,7 +2,7 @@ # #' An Implementation of Rapid Assessment Method for Older People (RAM-OP) #' -#' \href{http://www.helpage.org}{HelpAge International}, +#' \href{https://www.helpage.org/}{HelpAge International}, #' \href{http://www.validinternational.org}{VALID International}, and #' \href{http://www.brixtonhealth.com}{Brixton Health}, with financial #' assistance from the diff --git a/R/01-opIndicators.R b/R/01-opIndicators.R index 218b1ab..755a97f 100644 --- a/R/01-opIndicators.R +++ b/R/01-opIndicators.R @@ -81,7 +81,7 @@ create_op_demo <- function(svy) { demo.indicators.ALL <- tibble::tibble(demo.indicators.ALL) ## Return results - return(demo.indicators.ALL) + demo.indicators.ALL } @@ -111,7 +111,7 @@ create_op_demo <- function(svy) { create_op_demo_males <- function(svy) { x <- create_op_demo(svy = svy) demo.indicators.MALES <- subset(x, x$sex1 == 1) - return(demo.indicators.MALES) + demo.indicators.MALES } @@ -139,7 +139,7 @@ create_op_demo_males <- function(svy) { create_op_demo_females <- function(svy) { x <- create_op_demo(svy = svy) demo.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(demo.indicators.FEMALES) + demo.indicators.FEMALES } @@ -155,7 +155,7 @@ create_op_demo_females <- function(svy) { #' #' \cite{Kennedy G, Ballard T, Dop M C (2011). Guidelines for Measuring Household #' and Individual Dietary Diversity. Rome, FAO -#' \url{http://www.fao.org/docrep/014/i1983e/i1983e00.htm}} +#' \url{https://www.fao.org/3/i1983e/i1983e00.htm}} #' #' and extended to include indicators of probable adequate intake of a number of #' nutrients / micronutrients. @@ -303,7 +303,7 @@ create_op_food <- function(svy) { food.indicators.ALL <- tibble::tibble(food.indicators.ALL) ## Return results - return(food.indicators.ALL) + food.indicators.ALL } @@ -330,7 +330,7 @@ create_op_food <- function(svy) { create_op_food_males <- function(svy) { x <- create_op_food(svy = svy) food.indicators.MALES <- subset(x, x$sex1 == 1) - return(food.indicators.MALES) + food.indicators.MALES } @@ -357,7 +357,7 @@ create_op_food_males <- function(svy) { create_op_food_females <- function(svy) { x <- create_op_food(svy = svy) food.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(food.indicators.FEMALES) + food.indicators.FEMALES } @@ -418,7 +418,7 @@ create_op_hunger <- function(svy) { hunger.indicators.ALL <- tibble::tibble(hunger.indicators.ALL) ## Return results - return(hunger.indicators.ALL) + hunger.indicators.ALL } @@ -445,7 +445,7 @@ create_op_hunger <- function(svy) { create_op_hunger_males <- function(svy) { x <- create_op_hunger(svy = svy) food.indicators.MALES <- subset(x, x$sex1 == 1) - return(food.indicators.MALES) + food.indicators.MALES } @@ -472,7 +472,7 @@ create_op_hunger_males <- function(svy) { create_op_hunger_females <- function(svy) { x <- create_op_hunger(svy = svy) food.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(food.indicators.FEMALES) + food.indicators.FEMALES } @@ -576,7 +576,7 @@ create_op_adl <- function(svy) { adl.indicators.ALL <- tibble::tibble(adl.indicators.ALL) ## Return results - return(adl.indicators.ALL) + adl.indicators.ALL } @@ -604,7 +604,7 @@ create_op_adl <- function(svy) { create_op_adl_males <- function(svy) { x <- create_op_adl(svy = svy) adl.indicators.MALES <- subset(x, x$sex1 == 1) - return(adl.indicators.MALES) + adl.indicators.MALES } @@ -632,7 +632,7 @@ create_op_adl_males <- function(svy) { create_op_adl_females <- function(svy) { x <- create_op_adl(svy = svy) adl.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(adl.indicators.FEMALES) + adl.indicators.FEMALES } @@ -645,7 +645,7 @@ create_op_adl_females <- function(svy) { #' #' See: #' -#' \url{http://www.washingtongroup-disability.com} +#' \url{https://www.washingtongroup-disability.com} #' \url{https://www.cdc.gov/nchs/washington_group/wg_documents.htm} #' #' for details. @@ -783,7 +783,7 @@ create_op_disability <- function(svy) { disability.indicators.ALL <- tibble::tibble(disability.indicators.ALL) # Return results - return(disability.indicators.ALL) + disability.indicators.ALL } @@ -810,7 +810,7 @@ create_op_disability <- function(svy) { create_op_disability_males <- function(svy) { x <- create_op_disability(svy = svy) disability.indicators.MALES <- subset(x, x$sex1 == 1) - return(disability.indicators.MALES) + disability.indicators.MALES } @@ -837,7 +837,7 @@ create_op_disability_males <- function(svy) { create_op_disability_females <- function(svy) { x <- create_op_disability(svy = svy) disability.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(disability.indicators.FEMALES) + disability.indicators.FEMALES } @@ -913,7 +913,7 @@ create_op_mental <- function(svy) { mental.indicators.ALL <- tibble::tibble(mental.indicators.ALL) ## Return results - return(mental.indicators.ALL) + mental.indicators.ALL } @@ -940,7 +940,7 @@ create_op_mental <- function(svy) { create_op_mental_males <- function(svy) { x <- create_op_mental(svy = svy) mental.indicators.MALES <- subset(x, x$sex1 == 1) - return(mental.indicators.MALES) + mental.indicators.MALES } @@ -967,7 +967,7 @@ create_op_mental_males <- function(svy) { create_op_mental_females <- function(svy) { x <- create_op_mental(svy = svy) mental.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(mental.indicators.FEMALES) + mental.indicators.FEMALES } @@ -1038,7 +1038,7 @@ create_op_dementia <- function(svy) { dementia.indicators.ALL <- tibble::tibble(dementia.indicators.ALL) ## Return results - return(dementia.indicators.ALL) + dementia.indicators.ALL } @@ -1065,7 +1065,7 @@ create_op_dementia <- function(svy) { create_op_dementia_males <- function(svy) { x <- create_op_dementia(svy = svy) dementia.indicators.MALES <- subset(x, x$sex1 == 1) - return(dementia.indicators.MALES) + dementia.indicators.MALES } @@ -1092,7 +1092,7 @@ create_op_dementia_males <- function(svy) { create_op_dementia_females <- function(svy) { x <- create_op_dementia(svy = svy) dementia.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(dementia.indicators.FEMALES) + dementia.indicators.FEMALES } @@ -1197,7 +1197,7 @@ create_op_health <- function(svy) { health.indicators.ALL <- tibble::tibble(health.indicators.ALL) # Return results - return(health.indicators.ALL) + health.indicators.ALL } @@ -1225,7 +1225,7 @@ create_op_health <- function(svy) { create_op_health_males <- function(svy) { x <- create_op_health(svy = svy) health.indicators.MALES <- subset(x, x$sex1 == 1) - return(health.indicators.MALES) + health.indicators.MALES } @@ -1253,7 +1253,7 @@ create_op_health_males <- function(svy) { create_op_health_females <- function(svy) { x <- create_op_health(svy = svy) health.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(health.indicators.FEMALES) + health.indicators.FEMALES } @@ -1327,7 +1327,7 @@ create_op_income <- function(svy) { income.indicators.ALL <- tibble::tibble(income.indicators.ALL) ## Return results - return(income.indicators.ALL) + income.indicators.ALL } @@ -1354,7 +1354,7 @@ create_op_income <- function(svy) { create_op_income_males <- function(svy) { x <- create_op_income(svy = svy) income.indicators.MALES <- subset(x, x$sex1 == 1) - return(income.indicators.MALES) + income.indicators.MALES } @@ -1381,7 +1381,7 @@ create_op_income_males <- function(svy) { create_op_income_females <- function(svy) { x <- create_op_income(svy = svy) income.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(income.indicators.FEMALES) + income.indicators.FEMALES } @@ -1393,10 +1393,8 @@ create_op_income_females <- function(svy) { #' @section Water, sanitation and hygiene (WASH) indicators: #' #' These are a (core) subset of indicators from: +#' #' -#' \cite{WHO / UNICEF (2006). Core Questions on Drinking-water and Sanitation -#' for Household Surveys. Geneva, WHO / UNICEF -#' \url{http://www.who.int/water_sanitation_health/monitoring/household_surveys/en/}} #' #' \describe{ #' \item{\code{W1}}{Improved source of drinking water} @@ -1453,7 +1451,7 @@ create_op_wash <- function(svy) { wash.indicators.ALL <- tibble::tibble(wash.indicators.ALL) ## Return results - return(wash.indicators.ALL) + wash.indicators.ALL } @@ -1481,7 +1479,7 @@ create_op_wash <- function(svy) { create_op_wash_males <- function(svy) { x <- create_op_wash(svy = svy) wash.indicators.MALES <- subset(x, x$sex1 == 1) - return(wash.indicators.MALES) + wash.indicators.MALES } @@ -1509,7 +1507,7 @@ create_op_wash_males <- function(svy) { create_op_wash_females <- function(svy) { x <- create_op_wash(svy = svy) wash.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(wash.indicators.FEMALES) + wash.indicators.FEMALES } @@ -1561,7 +1559,7 @@ create_op_anthro <- function(svy) { anthro.indicators.ALL <- tibble::tibble(anthro.indicators.ALL) ## Return results - return(anthro.indicators.ALL) + anthro.indicators.ALL } @@ -1588,7 +1586,7 @@ create_op_anthro <- function(svy) { create_op_anthro_males <- function(svy) { x <- create_op_anthro(svy = svy) anthro.indicators.MALES <- subset(x, x$sex1 == 1) - return(anthro.indicators.MALES) + anthro.indicators.MALES } @@ -1615,7 +1613,7 @@ create_op_anthro_males <- function(svy) { create_op_anthro_females <- function(svy) { x <- create_op_anthro(svy = svy) anthro.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(anthro.indicators.FEMALES) + anthro.indicators.FEMALES } @@ -1667,7 +1665,7 @@ create_op_oedema <- function(svy) { oedema.indicators.ALL <- tibble::tibble(oedema.indicators.ALL) ## Return results - return(oedema.indicators.ALL) + oedema.indicators.ALL } @@ -1694,7 +1692,7 @@ create_op_oedema <- function(svy) { create_op_oedema_males <- function(svy) { x <- create_op_oedema(svy = svy) oedema.indicators.MALES <- subset(x, x$sex1 == 1) - return(oedema.indicators.MALES) + oedema.indicators.MALES } @@ -1721,7 +1719,7 @@ create_op_oedema_males <- function(svy) { create_op_oedema_females <- function(svy) { x <- create_op_oedema(svy = svy) oedema.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(oedema.indicators.FEMALES) + oedema.indicators.FEMALES } @@ -1771,7 +1769,7 @@ create_op_screening <- function(svy) { screening.indicators.ALL <- tibble::tibble(screening.indicators.ALL) # Return results - return(screening.indicators.ALL) + screening.indicators.ALL } @@ -1798,7 +1796,7 @@ create_op_screening <- function(svy) { create_op_screening_males <- function(svy) { x <- create_op_screening(svy = svy) screening.indicators.MALES <- subset(x, x$sex1 == 1) - return(screening.indicators.MALES) + screening.indicators.MALES } @@ -1825,7 +1823,7 @@ create_op_screening_males <- function(svy) { create_op_screening_females <- function(svy) { x <- create_op_screening(svy = svy) screening.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(screening.indicators.FEMALES) + screening.indicators.FEMALES } @@ -1887,7 +1885,7 @@ create_op_visual <- function(svy) { visual.indicators.ALL <- tibble::tibble(visual.indicators.ALL) ## Return results - return(visual.indicators.ALL) + visual.indicators.ALL } @@ -1914,7 +1912,7 @@ create_op_visual <- function(svy) { create_op_visual_males <- function(svy) { x <- create_op_visual(svy = svy) visual.indicators.MALES <- subset(x, x$sex1 == 1) - return(visual.indicators.MALES) + visual.indicators.MALES } @@ -1941,7 +1939,7 @@ create_op_visual_males <- function(svy) { create_op_visual_females <- function(svy) { x <- create_op_visual(svy = svy) visual.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(visual.indicators.FEMALES) + visual.indicators.FEMALES } @@ -1995,7 +1993,7 @@ create_op_misc <- function(svy) { misc.indicators.ALL <- tibble::tibble(misc.indicators.ALL) ## Return results - return(misc.indicators.ALL) + misc.indicators.ALL } @@ -2022,7 +2020,7 @@ create_op_misc <- function(svy) { create_op_misc_males <- function(svy) { x <- create_op_misc(svy = svy) misc.indicators.MALES <- subset(x, x$sex1 == 1) - return(misc.indicators.MALES) + misc.indicators.MALES } @@ -2049,7 +2047,7 @@ create_op_misc_males <- function(svy) { create_op_misc_females <- function(svy) { x <- create_op_misc(svy = svy) misc.indicators.FEMALES <- subset(x, x$sex2 == 1) - return(misc.indicators.FEMALES) + misc.indicators.FEMALES } @@ -2206,7 +2204,7 @@ create_op_all <- function(svy, } ## Return indicators - return(indicators) + indicators } @@ -2959,8 +2957,7 @@ createOP <- function(svy) { wgSelfCareD0, wgSelfCareD1, wgSelfCareD2, wgSelfCareD3, wgCommunicatingD0, wgCommunicatingD1, wgCommunicatingD2, wgCommunicatingD3, wgP0, wgP1, wgP2, wgP3, wgPM) - # - # - # - return(indicators.ALL) + + ## Return indicators.ALL + indicators.ALL } diff --git a/R/02-merge.R b/R/02-merge.R index ceb7c5a..1038f28 100644 --- a/R/02-merge.R +++ b/R/02-merge.R @@ -64,5 +64,5 @@ merge_estimates <- function(x, y, prop2percent = FALSE) { estimates <- tibble::tibble(estimates) ## Return - return(estimates) + estimates } diff --git a/R/03-fullTable.R b/R/03-fullTable.R index fb287de..49f3f8f 100644 --- a/R/03-fullTable.R +++ b/R/03-fullTable.R @@ -28,5 +28,5 @@ fullTable <- function(x, values) { } tab[is.na(tab)] <- 0 names(tab) <- as.character(values) - return(tab) + tab } diff --git a/R/04-get_variables.R b/R/04-get_variables.R index 0a48502..138b5df 100644 --- a/R/04-get_variables.R +++ b/R/04-get_variables.R @@ -106,5 +106,5 @@ get_variables <- function(indicators = c("demo", "food", "hunger", "adl", vars <- c(vars, "chew", "food", "NFRI") } ## - return(vars) + vars } diff --git a/R/05-classicBoot.R b/R/05-classicBoot.R index 16def97..523c8d0 100644 --- a/R/05-classicBoot.R +++ b/R/05-classicBoot.R @@ -115,5 +115,5 @@ estimate_classic <- function(x, classicEstimates <- tibble::tibble(classicEstimates) ## Return results - return(classicEstimates) + classicEstimates } diff --git a/R/06-probitBoot.R b/R/06-probitBoot.R index 2c95ea5..c7ed072 100644 --- a/R/06-probitBoot.R +++ b/R/06-probitBoot.R @@ -162,5 +162,5 @@ estimate_probit <- function(x, probitEstimates <- tibble::tibble(probitEstimates) ## Return probitEstimates - return(probitEstimates) + probitEstimates } diff --git a/R/07-probit_muac.R b/R/07-probit_muac.R index 680ee11..46fb61f 100644 --- a/R/07-probit_muac.R +++ b/R/07-probit_muac.R @@ -48,7 +48,7 @@ probit_gam <- function(x, params, threshold = 210) { x <- stats::pnorm(q = threshold, mean = m, sd = s) ## Return x - return(x) + x } @@ -102,5 +102,5 @@ probit_sam <- function(x, params, threshold = 185) { x <- stats::pnorm(q = threshold, mean = m, sd = s) ## Return x - return(x) + x } diff --git a/R/08-estimate_op.R b/R/08-estimate_op.R index 40ae487..86ff323 100644 --- a/R/08-estimate_op.R +++ b/R/08-estimate_op.R @@ -66,5 +66,5 @@ estimate_op_all <- function(x, w, resultsDF <- tibble::tibble(resultsDF) ## Return resultsDF - return(resultsDF) + resultsDF } diff --git a/README.Rmd b/README.Rmd index 51f5307..4e8053f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,12 +23,12 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/rapidsurveys/oldr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/R-CMD-check.yaml) [![R-hub](https://github.com/rapidsurveys/oldr/actions/workflows/rhub.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/rhub.yaml) [![test-coverage](https://github.com/rapidsurveys/oldr/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/rapidsurveys/oldr/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/oldr) +[![codecov](https://codecov.io/gh/rapidsurveys/oldr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/oldr) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/oldr/badge)](https://www.codefactor.io/repository/github/rapidsurveys/oldr) [![DOI](https://zenodo.org/badge/105472081.svg)](https://zenodo.org/badge/latestdoi/105472081) -[HelpAge International](http://www.helpage.org), [VALID International](http://www.validinternational.org), and [Brixton Health](http://www.brixtonhealth.com), with financial assistance from the [Humanitarian Innovation Fund (HIF)](http://www.elrha.org/hif/home/), have developed a **Rapid Assessment Method for Older People (RAM-OP)** that provides accurate and reliable estimates of the needs of older people. The method uses simple procedures, in a short time frame (i.e. about two weeks including training, data collection, data entry, and data analysis), and at considerably lower cost than other methods. The **RAM-OP** method is based on the following principles: +[HelpAge International](https://www.helpage.org), [VALID International](http://www.validinternational.org), and [Brixton Health](http://www.brixtonhealth.com), with financial assistance from the [Humanitarian Innovation Fund (HIF)](http://www.elrha.org/hif/home/), have developed a **Rapid Assessment Method for Older People (RAM-OP)** that provides accurate and reliable estimates of the needs of older people. The method uses simple procedures, in a short time frame (i.e. about two weeks including training, data collection, data entry, and data analysis), and at considerably lower cost than other methods. The **RAM-OP** method is based on the following principles: * Use of a familiar *“household survey”* design employing a two-stage cluster sample design optimised to allow the use of a small primary sample (*m ≥ 16 clusters*) and a small overall (*n ≥ 192*) sample. diff --git a/README.md b/README.md index 5d6eb91..5865e03 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,12 @@ stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https:// [![R-CMD-check](https://github.com/rapidsurveys/oldr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/R-CMD-check.yaml) [![R-hub](https://github.com/rapidsurveys/oldr/actions/workflows/rhub.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/rhub.yaml) [![test-coverage](https://github.com/rapidsurveys/oldr/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/rapidsurveys/oldr/actions/workflows/test-coverage.yaml) -[![codecov](https://codecov.io/gh/rapidsurveys/oldr/branch/main/graph/badge.svg)](https://codecov.io/gh/rapidsurveys/oldr) +[![codecov](https://codecov.io/gh/rapidsurveys/oldr/branch/main/graph/badge.svg)](https://app.codecov.io/gh/rapidsurveys/oldr) [![CodeFactor](https://www.codefactor.io/repository/github/rapidsurveys/oldr/badge)](https://www.codefactor.io/repository/github/rapidsurveys/oldr) [![DOI](https://zenodo.org/badge/105472081.svg)](https://zenodo.org/badge/latestdoi/105472081) -[HelpAge International](http://www.helpage.org), [VALID +[HelpAge International](https://www.helpage.org), [VALID International](http://www.validinternational.org), and [Brixton Health](http://www.brixtonhealth.com), with financial assistance from the [Humanitarian Innovation Fund diff --git a/man/create_op_disability.Rd b/man/create_op_disability.Rd index 3629088..c3f1b74 100644 --- a/man/create_op_disability.Rd +++ b/man/create_op_disability.Rd @@ -22,7 +22,7 @@ collected using the standard RAM-OP questionnaire See: -\url{http://www.washingtongroup-disability.com} +\url{https://www.washingtongroup-disability.com} \url{https://www.cdc.gov/nchs/washington_group/wg_documents.htm} for details. diff --git a/man/create_op_food.Rd b/man/create_op_food.Rd index 4650805..c33ca0e 100644 --- a/man/create_op_food.Rd +++ b/man/create_op_food.Rd @@ -25,7 +25,7 @@ the basic approach used is described in: \cite{Kennedy G, Ballard T, Dop M C (2011). Guidelines for Measuring Household and Individual Dietary Diversity. Rome, FAO -\url{http://www.fao.org/docrep/014/i1983e/i1983e00.htm}} +\url{https://www.fao.org/3/i1983e/i1983e00.htm}} and extended to include indicators of probable adequate intake of a number of nutrients / micronutrients. diff --git a/man/create_op_wash.Rd b/man/create_op_wash.Rd index a48bf3a..8f259c1 100644 --- a/man/create_op_wash.Rd +++ b/man/create_op_wash.Rd @@ -22,10 +22,7 @@ from survey data collected using the standard RAM-OP questionnaire. These are a (core) subset of indicators from: - -\cite{WHO / UNICEF (2006). Core Questions on Drinking-water and Sanitation -for Household Surveys. Geneva, WHO / UNICEF -\url{http://www.who.int/water_sanitation_health/monitoring/household_surveys/en/}} +\url{https://washdata.org/monitoring/methods/core-questions} \describe{ \item{\code{W1}}{Improved source of drinking water} diff --git a/man/oldr.Rd b/man/oldr.Rd index 0890539..349fe0f 100644 --- a/man/oldr.Rd +++ b/man/oldr.Rd @@ -6,7 +6,7 @@ \alias{oldr} \title{An Implementation of Rapid Assessment Method for Older People (RAM-OP)} \description{ -\href{http://www.helpage.org}{HelpAge International}, +\href{https://www.helpage.org/}{HelpAge International}, \href{http://www.validinternational.org}{VALID International}, and \href{http://www.brixtonhealth.com}{Brixton Health}, with financial assistance from the