From 22f4e5761a92d02b685ca6b42ab900c9236c09b7 Mon Sep 17 00:00:00 2001 From: Ernest Guevarra Date: Wed, 22 Jan 2025 18:57:46 +0000 Subject: [PATCH] address CRAN comments; uptick to v0.2.3 --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/08-report.R | 23 +++++++++++++---------- README.md | 4 ++-- cran-comments.md | 4 ++++ inst/CITATION | 2 +- man/report_op_pdf.Rd | 16 ++++++++-------- 7 files changed, 30 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4aa2de8..700f10a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: oldr Title: An Implementation of Rapid Assessment Method for Older People -Version: 0.2.2 +Version: 0.2.3 Authors@R: c( person("Mark", "Myatt", comment = c(ORCID = "0000-0003-1119-1474"), email = "mark@brixtonhealth.com", role = c("aut", "cph")), diff --git a/NEWS.md b/NEWS.md index a742bea..34b270d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# oldr 0.2.2 +# oldr 0.2.3 This is the first CRAN release of `{oldr}`. diff --git a/R/08-report.R b/R/08-report.R index 731aa3f..0cebece 100644 --- a/R/08-report.R +++ b/R/08-report.R @@ -1083,8 +1083,10 @@ report_op_odt <- function(estimates, ) ## Render document in HTML format - rmarkdown::render(input = paste(filename, ".Rmd", sep = ""), - output_format = "odt_document") + rmarkdown::render( + input = paste(filename, ".Rmd", sep = ""), + output_format = "odt_document" + ) ## Check if report is to be viewed if (view) { @@ -1094,6 +1096,7 @@ report_op_odt <- function(estimates, } +#' #' Create a PDF report document containing RAM-OP survey results #' #' @param estimates A data.frame of RAM-OP results produced by [merge_op()]. @@ -1108,17 +1111,17 @@ report_op_odt <- function(estimates, #' to a specified directory. #' #' @examples -#' if (FALSE) { -#' classicResults <- estimate_classic( -#' x = create_op(testSVY), w = testPSU, replicates = 9 -#' ) +#' classicResults <- estimate_classic( +#' x = create_op(testSVY), w = testPSU, replicates = 3 +#' ) #' -#' probitResults <- estimate_probit( -#' x = create_op(testSVY), w = testPSU, replicates = 9 -#' ) +#' probitResults <- estimate_probit( +#' x = create_op(testSVY), w = testPSU, replicates = 3 +#' ) #' -#' resultsDF <- merge_op(x = classicResults, y = probitResults) +#' resultsDF <- merge_op(x = classicResults, y = probitResults) #' +#' \donttest{ #' report_op_pdf( #' svy = testSVY, estimates = resultsDF, indicators = "mental", #' filename = paste(tempdir(), "report", sep = "/") diff --git a/README.md b/README.md index eb84ed1..5811aaa 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.2, +#> , R package version 0.2.3, #> . #> #> 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.2}, +#> note = {R package version 0.2.3}, #> url = {https://rapidsurveys.io/oldr/}, #> doi = {10.5281/zenodo.7505731}, #> } diff --git a/cran-comments.md b/cran-comments.md index f0cd3c7..19e4c96 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -14,6 +14,10 @@ In this resubmission, I addressed the following comments from CRAN: - I removed `\dontrun{}` from the example for the `merge_op()` function. +* `if (FALSE)` in examples should never be used + + - I removed the `if (FALSE)` example in the `report_op_pdf()` function + documentation and added `donttest{}` as the example takes longer than 5s. ## Test environments * local OS X install, R 4.4.2 diff --git a/inst/CITATION b/inst/CITATION index 8e89895..8b96d1b 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.2", + note = "R package version 0.2.3", url = "https://rapidsurveys.io/oldr/", doi = "10.5281/zenodo.7505731" ) diff --git a/man/report_op_pdf.Rd b/man/report_op_pdf.Rd index 3e9ce13..10b0f68 100644 --- a/man/report_op_pdf.Rd +++ b/man/report_op_pdf.Rd @@ -36,17 +36,17 @@ to a specified directory. Create a PDF report document containing RAM-OP survey results } \examples{ -if (FALSE) { - classicResults <- estimate_classic( - x = create_op(testSVY), w = testPSU, replicates = 9 - ) +classicResults <- estimate_classic( + x = create_op(testSVY), w = testPSU, replicates = 3 +) - probitResults <- estimate_probit( - x = create_op(testSVY), w = testPSU, replicates = 9 - ) +probitResults <- estimate_probit( + x = create_op(testSVY), w = testPSU, replicates = 3 +) - resultsDF <- merge_op(x = classicResults, y = probitResults) +resultsDF <- merge_op(x = classicResults, y = probitResults) +\donttest{ report_op_pdf( svy = testSVY, estimates = resultsDF, indicators = "mental", filename = paste(tempdir(), "report", sep = "/")