diff --git a/.Rbuildignore b/.Rbuildignore index d66b4ee..4d08d2b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -20,3 +20,4 @@ ^pkgdown$ ^CODE_OF_CONDUCT\.md$ ^README\.html$ +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index afa4f81..4aa2de8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: oldr Title: An Implementation of Rapid Assessment Method for Older People -Version: 0.2.1 +Version: 0.2.2 Authors@R: c( person("Mark", "Myatt", comment = c(ORCID = "0000-0003-1119-1474"), email = "mark@brixtonhealth.com", role = c("aut", "cph")), @@ -11,13 +11,10 @@ Authors@R: c( person("HelpAge International", role = "cph"), person("Elrha", role = "fnd")) Description: An implementation of the Rapid Assessment Method for Older People - 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 - 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. + 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. License: GPL-3 Depends: R (>= 4.1.0) Imports: diff --git a/NEWS.md b/NEWS.md index 2c09788..a742bea 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# oldr 0.2.1 +# oldr 0.2.2 This is the first CRAN release of `{oldr}`. diff --git a/R/00-oldr.R b/R/00-oldr.R index 6677d9d..f575905 100644 --- a/R/00-oldr.R +++ b/R/00-oldr.R @@ -3,12 +3,12 @@ #' #' [HelpAge International](https://www.helpage.org/), VALID International, 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 +#' 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: @@ -21,7 +21,7 @@ #' prevalence of global, moderate and severe acute malnutrition) using, #' whenever possible, standard and well-tested indicators and question sets. #' -#' * Data analysis performed using modern computer-intensive methods to allow +#' * Data analysis performed using modern computer-intensive methods to allow #' estimates of indicator levels to be made with useful precision using a small #' sample size. #' diff --git a/R/05-merge_op.R b/R/05-merge_op.R index b1cf807..f2dc797 100644 --- a/R/05-merge_op.R +++ b/R/05-merge_op.R @@ -11,11 +11,25 @@ #' @author Ernest Guevarra #' #' @examples -#' \dontrun{ -#' test <- merge_op( -#' x = classicEstimates, y = probitEstimates -#' ) -#' } +#' indicators <- c( +#' "demo", "anthro", "food", "hunger", "adl", "disability", +#' "mental", "dementia", "health", "oedema", "screening", "income", +#' "wash", "visual", "misc" +#' ) +#' +#' classicIndicators <- indicators[indicators != "anthro"] +#' +#' ## Bootstrap classic +#' classicEstimates <- estimate_classic( +#' x = indicators.ALL, w = testPSU, +#' indicators = classicIndicators, replicates = 9 +#' ) +#' +#' probitEstimates <- estimate_probit( +#' x = indicators.ALL, w = testPSU, replicates = 9 +#' ) +#' +#' merge_op(x = classicEstimates, y = probitEstimates) #' #' @export #' diff --git a/R/utils.R b/R/utils.R index cca44d0..5530244 100644 --- a/R/utils.R +++ b/R/utils.R @@ -6,11 +6,7 @@ #' #' @returns A one-dimensional table with specified values #' -#' @author Mark Myatt -#' -#' @examples -#' oldr:::fullTable(testSVY$d1, values = 1:4) -#' +#' @author Mark Myatt #' #' @keywords internal #' @@ -37,9 +33,6 @@ fullTable <- function(x, values) { #' #' @returns A vector of variable names #' -#' @examples -#' oldr:::get_variables() -#' #' @keywords internal #' diff --git a/README.md b/README.md index c54e191..eb84ed1 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ citation("oldr") #> Mark Myatt, Ernest Guevarra, Pascale Fritsch, Katja Siling (2025). #> _oldr: An Implementation of Rapid Assessment Method for Older #> People_. doi:10.5281/zenodo.7505731 -#> , R package version 0.2.1, +#> , R package version 0.2.2, #> . #> #> A BibTeX entry for LaTeX users is @@ -104,7 +104,7 @@ citation("oldr") #> title = {oldr: An Implementation of Rapid Assessment Method for Older People}, #> author = {{Mark Myatt} and {Ernest Guevarra} and {Pascale Fritsch} and {Katja Siling}}, #> year = {2025}, -#> note = {R package version 0.2.1}, +#> note = {R package version 0.2.2}, #> url = {https://rapidsurveys.io/oldr/}, #> doi = {10.5281/zenodo.7505731}, #> } diff --git a/cran-comments.md b/cran-comments.md index b217b28..f0cd3c7 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,24 @@ +## RESUBMISSION + +In this resubmission, I addressed the following comments from CRAN: + +* It seems like you have too many spaces in your description field. Probably because linebreaks count as spaces too. Please remove unecassary ones. + + - I removed spaces from previous line before a line break and then removed the last two sentences to avoid creating more line breaks + +* You have examples for unexported functions. Please either omit these examples or export these functions. + + - I removed all examples from unexported functions + +* `\dontrun{}` should only be used if the example really cannot be executed + + - I removed `\dontrun{}` from the example for the `merge_op()` function. + + ## Test environments * local OS X install, R 4.4.2 * local ubuntu 22.04 install, R 4.4.2 -* win-builder (devel, release and old release) +* win-builder (devel, release, and old release) * github actions windows-latest, r: release * github actions macOS-latest, r: release * github actions ubuntu-22.04, r: release, devel, old release @@ -21,8 +38,3 @@ * This is a new release. - -## Reverse dependencies - -This is a new release. There are no reverse/downstream dependencies. - diff --git a/inst/CITATION b/inst/CITATION index 9f45f4c..8e89895 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -4,7 +4,7 @@ bibentry( title = "oldr: An Implementation of Rapid Assessment Method for Older People", author = c(person("Mark Myatt"), person("Ernest Guevarra"), person("Pascale Fritsch"), person("Katja Siling")), year = "2025", - note = "R package version 0.2.1", + note = "R package version 0.2.2", url = "https://rapidsurveys.io/oldr/", doi = "10.5281/zenodo.7505731" ) diff --git a/man/fullTable.Rd b/man/fullTable.Rd index 98c685a..64a5a59 100644 --- a/man/fullTable.Rd +++ b/man/fullTable.Rd @@ -16,11 +16,6 @@ A one-dimensional table with specified values } \description{ Fill out a one-dimensional table to include a specified range of values -} -\examples{ -oldr:::fullTable(testSVY$d1, values = 1:4) - - } \author{ Mark Myatt diff --git a/man/get_variables.Rd b/man/get_variables.Rd index 25f7502..a5e61e7 100644 --- a/man/get_variables.Rd +++ b/man/get_variables.Rd @@ -22,9 +22,5 @@ A vector of variable names \description{ Get appropriate RAM-OP indicator variable names given a specified indicator set -} -\examples{ -oldr:::get_variables() - } \keyword{internal} diff --git a/man/merge_op.Rd b/man/merge_op.Rd index 5d77d0d..5749e48 100644 --- a/man/merge_op.Rd +++ b/man/merge_op.Rd @@ -21,11 +21,25 @@ A \code{\link[=data.frame]{data.frame()}} of combined classic and probit estimat Concatenate classic and PROBIT estimates into a single data.frame } \examples{ -\dontrun{ - test <- merge_op( - x = classicEstimates, y = probitEstimates - ) -} +indicators <- c( + "demo", "anthro", "food", "hunger", "adl", "disability", + "mental", "dementia", "health", "oedema", "screening", "income", + "wash", "visual", "misc" +) + +classicIndicators <- indicators[indicators != "anthro"] + +## Bootstrap classic +classicEstimates <- estimate_classic( + x = indicators.ALL, w = testPSU, + indicators = classicIndicators, replicates = 9 +) + +probitEstimates <- estimate_probit( + x = indicators.ALL, w = testPSU, replicates = 9 +) + +merge_op(x = classicEstimates, y = probitEstimates) } \author{