generated from pharmaverse/admiraltemplate
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* initial commit * chore: #15 rename growth charts with cdc_ prefix * chore: #15 forgot to run `devtools::document()` * styler, spelling, fix template * add news snippet (#15) * adopt way of housing data * docs: #15 cleanup roxygen docs * styler, lintr, roxygen * rough draft of get_cdc_data() * use `internal = TRUE` * swap out snapshots * cleanup template as well * forgot .rd file * clean back up news, use it next version * chore: #15 cleanup stuff from github actions * fix usethis() statement * will this pass lintr instead * make lintr exception is best course * make an exception to all library() call because data is internal * get around lintr * feat: #15 adopt feedback * rerun devtools, fix pipe, and meta.r file * fix visual aesthetic of dataset description * fix 9th decimal issue * get past lintr * add the last digit for S column in bmi page * merge conflict for spelling
- Loading branch information
Showing
21 changed files
with
1,497 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ | |
^README.Rmd$ | ||
^data-raw$ | ||
^\.devcontainer$ | ||
^data-raw$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,3 +50,4 @@ admiraltemplate*.tgz | |
|
||
# Docs | ||
docs/ | ||
inst/doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#' Retrieve CDC growth chart metadataset | ||
#' | ||
#' Retrieves CDC growth chart metadataset | ||
#' | ||
#' @param type Type of Chart | ||
#' | ||
#' *Permitted Values*: `"height"`, `"weight"`, `"bmi"` | ||
#' | ||
#' @return A data-frame of the appropriate growth chart from the CDC data | ||
#' | ||
#' @details | ||
#' | ||
#' Each data frame will be denoted as below: | ||
#' \describe{ | ||
#' \item{\code{SEX}}{Sex: 1 = male, 2 = female} | ||
#' \item{\code{AGE}}{Age in months} | ||
#' \item{\code{L}}{Box-Cox transformation for normality} | ||
#' \item{\code{M}}{Median} | ||
#' \item{\code{S}}{Coefficient of variation} | ||
#' } | ||
#' | ||
#' This metadata is sourced from the | ||
#' [CDC website](https://www.cdc.gov/growthcharts/percentile_data_files.htm). | ||
#' | ||
#' @family metadata | ||
#' @keywords metadata | ||
#' | ||
#' @export | ||
#' | ||
#' @examples | ||
#' get_cdc_data(type = "bmi") | ||
get_cdc_data <- function(type) { | ||
# Limit input values to the three datasets available from CDC data | ||
assert_character_scalar(type, values = c("height", "weight", "bmi")) | ||
|
||
# Grab the appropriate one | ||
switch(type, | ||
height = cdc_htage, | ||
weight = cdc_wtage, | ||
bmi = cdc_bmiage | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.