diff --git a/man/get_area.Rd b/man/get_area.Rd deleted file mode 100644 index 386b71a..0000000 --- a/man/get_area.Rd +++ /dev/null @@ -1,28 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/utils.R -\name{get_area} -\alias{get_area} -\title{Get area titles and codes based on area type} -\usage{ -get_area(areatype) -} -\arguments{ -\item{areatype}{One of the following values: -\itemize{ -\item "county" -\item "hsa" -\item "state". -}} -} -\value{ -A character vector containing the title and code of the specified area type. -} -\description{ -This function returns the title and code corresponding to the specified area type. -} -\examples{ - \dontrun{ -get_area("county") -get_area("hsa") -} -} diff --git a/tests/testthat/test-handle-alcohol.R b/tests/testthat/test-handle-alcohol.R index 58e089c..f498e7b 100644 --- a/tests/testthat/test-handle-alcohol.R +++ b/tests/testthat/test-handle-alcohol.R @@ -6,8 +6,7 @@ test_that("handle_alcohol correctly maps alcohol", { c("binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men), ages 21+"), handle_alcohol ) - expected <- c(`binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men), - ages 21+` = "v505") + expected <- c(`binge drinking (4+ drinks on one occasion for women, 5+ drinks for one occasion for men), ages 21+` = "v505") expect_equal(result, expected) }) diff --git a/tests/testthat/test-incidence-cancer.R b/tests/testthat/test-incidence-cancer.R index 9fa3a5f..b364e8b 100644 --- a/tests/testthat/test-incidence-cancer.R +++ b/tests/testthat/test-incidence-cancer.R @@ -113,14 +113,15 @@ test_that("incidence_cancer handles invalid cancer parameters", { expect_error( incidence_cancer( "wa", "county", "all cancer sites", "black (non-hispanic)", - "both sexes", "ages 65+", "late stage (regional & distant)" + "both sexes", "ages 65+", "late stage (regional & distant)", + "latest 5 year average" ), "For this cancer type, stage must be all stages" ) expect_error( incidence_cancer( "ca", "hsa", "prostate", "all races (includes hispanic)", "both sexes", - "ages 50+", "all stages" + "ages 50+", "all stages", "latest 5 year average" ), "For prostate cancer, sex must be males." ) diff --git a/tests/testthat/test-mortality-cancer.R b/tests/testthat/test-mortality-cancer.R index c38280f..04dba79 100644 --- a/tests/testthat/test-mortality-cancer.R +++ b/tests/testthat/test-mortality-cancer.R @@ -111,14 +111,15 @@ test_that("mortality_cancer handles invalid cancer parameters", { mortality_cancer( area = "wa", areatype = "county", cancer = "ovary", race = "all races (includes hispanic)", - sex = "both sexes", age = "ages 50+" + sex = "both sexes", age = "ages 50+", + year = "latest 5 year average" ), "For this cancer type, sex must be females" ) expect_error( mortality_cancer( "usa", "state", "prostate", "all races (includes hispanic)", - "both sexes", "ages 50+" + "both sexes", "ages 50+", "latest 5 year average" ), "For prostate cancer, sex must be males." )