From cadec19b6b565f773f2f9200776ea358e6847669 Mon Sep 17 00:00:00 2001 From: Jack Wasey Date: Thu, 3 Sep 2015 18:56:04 -0400 Subject: [PATCH] final tweaks before 1.2.1 submission --- NAMESPACE | 3 +++ R/benchmark.R | 1 + R/datadocs.R | 1 - R/zzz.R | 6 ++++-- cran-comments.md | 7 ++++--- icd9.Rproj | 6 +++--- man/icd9Hierarchy.Rd | 2 -- tests/testthat/test-comorbid.R | 9 +++++++-- 8 files changed, 22 insertions(+), 13 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 1c398257..580f11e0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -106,9 +106,12 @@ import(checkmate) importFrom(stats,aggregate) importFrom(stats,reshape) importFrom(stats,runif) +importFrom(utils,Rprof) +importFrom(utils,capture.output) importFrom(utils,download.file) importFrom(utils,head) importFrom(utils,read.csv) +importFrom(utils,summaryRprof) importFrom(utils,tail) importFrom(utils,unzip) useDynLib(icd9) diff --git a/R/benchmark.R b/R/benchmark.R index 1c9dcbf9..b2f7293d 100644 --- a/R/benchmark.R +++ b/R/benchmark.R @@ -243,6 +243,7 @@ icd9BenchComorbidParallel <- function() { #' importance, after correctness. R package test code is for correctness, #' whereas this script stresses the core functions, and looks for bottlenecks. #' @keywords internal +#' @importFrom utils Rprof capture.output Rprof summaryRprof icd9Benchmark <- function() { # generate large data set: this is copied from test-ICD9.R for now... set.seed(1441) diff --git a/R/datadocs.R b/R/datadocs.R index 0b0064fd..28f423a9 100644 --- a/R/datadocs.R +++ b/R/datadocs.R @@ -61,7 +61,6 @@ NULL #' \url{http://www.cms.gov/Medicare/Coding/ICD9ProviderDiagnosticCodes/codes.html} #' This page has versions 23 to 32 (2005 to 2014). At present, only the 2014 #' data is included in this package. -#' @source \url{http://wonder.cdc.gov/wonder/help/icd.html} #' @source #' \url{http://wonder.cdc.gov/wonder/sci_data/codes/icd9/type_txt/icd9abb.asp} #' @source diff --git a/R/zzz.R b/R/zzz.R index 6f741ffa..033ecc31 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -39,7 +39,7 @@ install_github(\"jackwasey/icd9\") release_questions <- function() { c( "Have you checked all TODO comments", - "Is there any commented code? (lint for this now possible)", + "Have you removed any commented code? (lint for this now possible)", "Have tests been run with do_slow_tests turned on?", "Are there skipped tests which should be run?", "Do all examples look ok (not just run without errors)?", @@ -54,7 +54,9 @@ release_questions <- function() { "Does every file have correct licence information?", "Have you linted?", "Does it compile and check fine on travis?", - "Have you checked on Windows, win_builder (if possible with configure step), Mac, Ubuntu, ASAN, and UBSAN rocker, and updated my docker image which resembles a CRAN maintainers environment?", + "Have you checked on Windows, win_builder (if possible with configure step), + Mac, Ubuntu, ASAN, and UBSAN rocker, and updated my docker image which + resembles a CRAN maintainers environment?", "Are all NOTES from R CMD check documented in cran-comments.md", "Have all unnecessary files been ignored in built archive? Especially thinking of autoconfigure stuff." ) diff --git a/cran-comments.md b/cran-comments.md index d8998a7a..7e87e42c 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,10 +4,11 @@ ## Test environments * Ubuntu 15.04 R 3.2.2, clang 3.6.0 and gcc 4.9.2 * Ubuntu 12.04 (on travis-ci) R 3.2, gcc 4.6.3 -* Debian jessie in docker with UBSAN and clang, R 3.1.2 +* Debian jessie in docker with UBSAN and clang, R 3.2.2 * Windows 7 64 bit R 3.2 with gcc from Rtools32 +* Windows 7 64 bit R 3.3 devel with gcc from Rtools33 -## R CMD check results +# R CMD check results There is one note: @@ -15,4 +16,4 @@ There is one note: Note: found 14 marked Latin-1 strings Note: found 39 marked UTF-8 strings -These are integral to included data which has accented characters in some disease names. +These are integral to included data which have accented characters in some disease names. diff --git a/icd9.Rproj b/icd9.Rproj index 70fea1d7..d88f7007 100644 --- a/icd9.Rproj +++ b/icd9.Rproj @@ -17,7 +17,7 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes -PackageInstallArgs: --force-biarch --with-keep.source --install-tests -PackageBuildBinaryArgs: --install-tests --force-biarch -PackageCheckArgs: --multiarch +PackageInstallArgs: --with-keep.source --install-tests +PackageBuildBinaryArgs: --install-tests +PackageCheckArgs: --as-cran PackageRoxygenize: rd,namespace diff --git a/man/icd9Hierarchy.Rd b/man/icd9Hierarchy.Rd index 2575e9c4..cba1fc4f 100644 --- a/man/icd9Hierarchy.Rd +++ b/man/icd9Hierarchy.Rd @@ -14,8 +14,6 @@ Rich text descriptions here: This page has versions 23 to 32 (2005 to 2014). At present, only the 2014 data is included in this package. -\url{http://wonder.cdc.gov/wonder/help/icd.html} - \url{http://wonder.cdc.gov/wonder/sci_data/codes/icd9/type_txt/icd9abb.asp} \url{http://wonder.cdc.gov/wonder/sci_data/codes/icd9/type_txt/icd9cm.asp} diff --git a/tests/testthat/test-comorbid.R b/tests/testthat/test-comorbid.R index 7f056b6f..f2cd99c4 100644 --- a/tests/testthat/test-comorbid.R +++ b/tests/testthat/test-comorbid.R @@ -585,8 +585,13 @@ test_that("diff comorbid works", { expect_that(resq <- icd9DiffComorbid(quanElixComorbid, quanDeyoComorbid, show = TRUE), testthat::not(gives_warning())) - # TODO: actually do a test here? - utils::capture.output(resq <- icd9DiffComorbid(quanElixComorbid, quanDeyoComorbid, show = TRUE)) + + expect_that( + utils::capture.output( + resq <- icd9DiffComorbid(quanElixComorbid, quanDeyoComorbid, show = TRUE) + ), + testthat::not(throws_error()) + ) })