R/readHHS_USDA.R

Defines functions readHHS_USDA

Documented in readHHS_USDA

#' @title readHHS_USDA
#' @description reads calory requirement for a standardized population from
#' HHS & USDA. 2015. "2015-2020 Dietary Guidelines for Americans."
#' 8. Dietary Guidelines for Americans.
#' https://health.gov/dietaryguidelines/2015/resources/2015-2020_Dietary_Guidelines.pdf.
#' Appendix 2
#'
#' @return Magpie object with results on global level.
#' @author Benjamin Leon Bodirsky
#' @seealso
#' [convertLassaletta2014()],
#' [readSource()]
#'
readHHS_USDA <- function() { # nolint: object_name_linter.
  a <- read.csv("appendix2.csv", sep = ";", header = TRUE)

  a <- as.magpie(a)
  getSets(a) <- c("region", "year", "sex", "age", "activity")
  return(a)
}
pik-piam/mrcommons documentation built on Dec. 8, 2024, 7:23 a.m.