From 31ccb9f66faf0f8200b45c9c47bd6f1774464687 Mon Sep 17 00:00:00 2001 From: realbp Date: Thu, 29 Feb 2024 11:49:22 -0800 Subject: [PATCH] triple zeros --- NAMESPACE | 2 +- R/demo-crowding.R | 5 ----- R/risk-diet-exercise.R | 4 +++- man/{area.Rd => demo_crowding.Rd} | 11 +++-------- man/mortality_cancer.Rd | 3 --- man/risk_diet_exercise.Rd | 4 +++- tests/testthat/test-handle-whealth.R | 4 ++-- tests/testthat/test-risk-colorectal-screening.R | 2 +- 8 files changed, 13 insertions(+), 22 deletions(-) rename man/{area.Rd => demo_crowding.Rd} (89%) diff --git a/NAMESPACE b/NAMESPACE index df9d855..4b1f7ff 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,7 @@ # Generated by roxygen2: do not edit by hand export("%>%") -export(area) +export(demo_crowding) export(demo_education) export(demo_food) export(demo_income) diff --git a/R/demo-crowding.R b/R/demo-crowding.R index 6ee98d5..25f019b 100644 --- a/R/demo-crowding.R +++ b/R/demo-crowding.R @@ -35,11 +35,6 @@ #' race = "black") #' } #' - -area = "wa" -areatype = "county" -race = "all races (includes hispanic)" - demo_crowding <- function(area, areatype, race) { crowding = "00027" diff --git a/R/risk-diet-exercise.R b/R/risk-diet-exercise.R index 1bcba43..743ff53 100644 --- a/R/risk-diet-exercise.R +++ b/R/risk-diet-exercise.R @@ -20,7 +20,9 @@ #' risk_diet_exercise(diet_exercise = "bmi is healthy, ages 20+", #' race = "all races (includes hispanic)", #' sex = "both sexes") -#' risk_diet_exercise(diet_exer"bmi is obese, high school survey", "all races (includes hispanic)", "males") +#' risk_diet_exercise(diet_exercise = "bmi is obese, high school survey", +#' race = "all races (includes hispanic)", +#' sex = "males") #' } risk_diet_exercise <- function(diet_exercise, race, sex) { diff --git a/man/area.Rd b/man/demo_crowding.Rd similarity index 89% rename from man/area.Rd rename to man/demo_crowding.Rd index 0f8e7e0..41519bf 100644 --- a/man/area.Rd +++ b/man/demo_crowding.Rd @@ -1,14 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/demo-crowding.R -\docType{data} -\name{area} -\alias{area} +\name{demo_crowding} +\alias{demo_crowding} \title{Access to Crowding Data} -\format{ -An object of class \code{character} of length 1. -} \usage{ -area +demo_crowding(area, areatype, race) } \arguments{ \item{area}{A state/territory abbreviation or USA.} @@ -46,4 +42,3 @@ demo_crowding(area = "pr", } } -\keyword{datasets} diff --git a/man/mortality_cancer.Rd b/man/mortality_cancer.Rd index 70e4986..565edeb 100644 --- a/man/mortality_cancer.Rd +++ b/man/mortality_cancer.Rd @@ -36,9 +36,6 @@ A data frame with the following columns: Area Type, Area Code, "Met Healthy Peop \description{ This function returns a data frame from Cancer Mortality in State Cancer Profiles } -\details{ -This is the details section this is where the finer details of the function are explained -} \examples{ \dontrun{ mortality_cancer(area = "wa", diff --git a/man/risk_diet_exercise.Rd b/man/risk_diet_exercise.Rd index 5caad02..fd36d76 100644 --- a/man/risk_diet_exercise.Rd +++ b/man/risk_diet_exercise.Rd @@ -29,6 +29,8 @@ This function returns a data frame from Diet & Exercise in State Cancer Profiles risk_diet_exercise(diet_exercise = "bmi is healthy, ages 20+", race = "all races (includes hispanic)", sex = "both sexes") -risk_diet_exercise(diet_exer"bmi is obese, high school survey", "all races (includes hispanic)", "males") +risk_diet_exercise(diet_exercise = "bmi is obese, high school survey", + race = "all races (includes hispanic)", + sex = "males") } } diff --git a/tests/testthat/test-handle-whealth.R b/tests/testthat/test-handle-whealth.R index d393248..21dcee1 100644 --- a/tests/testthat/test-handle-whealth.R +++ b/tests/testthat/test-handle-whealth.R @@ -5,7 +5,7 @@ test_that("handle whealth correctly maps whealth", { result <- sapply(c("mammogram in past 2 years, ages 50-74", "mammogram in past 2 years, ages 40+", "pap smear in past 3 years, no hysterectomy, ages 21-65"), - handle_whealth) + handle_women_health) expected <- c(`mammogram in past 2 years, ages 50-74` = "v05", `mammogram in past 2 years, ages 40+` = "v06", `pap smear in past 3 years, no hysterectomy, ages 21-65` = "v17") @@ -14,5 +14,5 @@ test_that("handle whealth correctly maps whealth", { }) test_that("handle whealth expects errors for incorrect arguments", { - expect_error(handle_whealth("carrot")) + expect_error(handle_women_health("carrot")) }) \ No newline at end of file diff --git a/tests/testthat/test-risk-colorectal-screening.R b/tests/testthat/test-risk-colorectal-screening.R index 98a07c6..c3f15dd 100644 --- a/tests/testthat/test-risk-colorectal-screening.R +++ b/tests/testthat/test-risk-colorectal-screening.R @@ -16,7 +16,7 @@ screening_options <- list( screening3 = risk_colorectal_screening("had colonoscopy in past 10 years, ages 50-75", area = "wa"), screening4 = risk_colorectal_screening("home blood stool test in the past year, ages 45-75", "all races (includes hispanic)", "both sexes"), - screening5 = risk_colorectal_screening("receieved at least one recommended crc test, ages 45-75", + screening5 = risk_colorectal_screening("received at least one recommended crc test, ages 45-75", "all races (includes hispanic)", "both sexes") )