From 6898388050fb2b6e1e24a6d2f4de8db26e94f6d9 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 27 Jun 2024 10:49:02 -0400 Subject: [PATCH] Add packages and load info --- NAMESPACE | 6 ++++++ R/dasehr-package.R | 21 +++++++++++++++++++++ R/zzz.R | 4 ++++ man/dasehr-package.Rd | 25 +++++++++++++++++++++++++ tests/testthat/test-calenviroscreen.R | 8 ++++++++ 5 files changed, 64 insertions(+) create mode 100644 R/dasehr-package.R create mode 100644 R/zzz.R create mode 100644 man/dasehr-package.Rd create mode 100644 tests/testthat/test-calenviroscreen.R diff --git a/NAMESPACE b/NAMESPACE index 6ae9268..5e8255a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,2 +1,8 @@ # Generated by roxygen2: do not edit by hand +import(dplyr) +import(naniar) +import(readr) +import(stringr) +import(tidyr) +importFrom(tibble,tibble) diff --git a/R/dasehr-package.R b/R/dasehr-package.R new file mode 100644 index 0000000..b1a6fe7 --- /dev/null +++ b/R/dasehr-package.R @@ -0,0 +1,21 @@ +#' `dasehr`: Load data and packages needed for DaSEH (Data Science for +#' Environmental Health) +#' +#' @details +#' +#' Here is a list of the datasets. They are already stored as objects when you +#' load the package. +#' * `calenviroscreen`: Description here + +#' @keywords internal +"_PACKAGE" + +## usethis namespace: start +#' @importFrom tibble tibble +#' @import readr +#' @import dplyr +#' @import tidyr +#' @import naniar +#' @import stringr +## usethis namespace: end +NULL diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 0000000..dd1e967 --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,4 @@ +.onLoad <- function(libname, pkgname){ + message(paste("Loading", pkgname, "🌼")) + message(paste("Run ?dasehr for more information on this package its datasets.")) +} diff --git a/man/dasehr-package.Rd b/man/dasehr-package.Rd new file mode 100644 index 0000000..62c6f2f --- /dev/null +++ b/man/dasehr-package.Rd @@ -0,0 +1,25 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/dasehr-package.R +\docType{package} +\name{dasehr-package} +\alias{dasehr} +\alias{dasehr-package} +\title{`dasehr`: Load data and packages needed for DaSEH (Data Science for +Environmental Health)} +\description{ +This package contains the datasets used in the Data Science for Environmental Health (DaSEH) short course taught by Ava M. Hoffman and Carrie Wright through the Data Science Lab at the Fred Hutchinson Cancer Center. +} +\details{ +Here is a list of the datasets. They are already stored as objects when you +load the package. +* `calenviroscreen`: Description here +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/ehumph/dasehr} + \item Report bugs at \url{https://github.com/ehumph/dasehr/issues} +} + +} +\keyword{internal} diff --git a/tests/testthat/test-calenviroscreen.R b/tests/testthat/test-calenviroscreen.R new file mode 100644 index 0000000..680a3be --- /dev/null +++ b/tests/testthat/test-calenviroscreen.R @@ -0,0 +1,8 @@ +test_that("Is non-empty tibble", { + expect_false( + dim(calenviroscreen)[1] == 0 + ) + expect_false( + dim(calenviroscreen)[2] == 0 + ) +})