knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of jgNutritionTools is to provide a toolset for the analysis and management of human health and physical data.
You can install the development version of jgNutritionTools from GitHub with:
# install.packages("devtools") devtools::install_github("MacDonaldMichael1/jgNutritionTools") library(jgNutritionTools)
Assuming a valid DB connection has been made:
require(RMySQL) lapply(dbListConnections(MySQL()), dbDisconnect) dbListConnections(MySQL()) mydb <- dbConnect(drv = MySQL(), host="nutritionsecurity-2.ctincuwvvm7w.us-west-2.rds.amazonaws.com", default.file = path.expand("~/.my.cnf"), group = "admin2") devtools::load_all()
library(tidyverse) ## Show country and DHSYEAR combos for DHS surveys with country code getCountryYearCom(mydb) %>% head()
getPrecip(conn = mydb, countryCode = "854", Year = "2003", startDate = '2002-01-01', endDate = '2003-12-31')[1:5, c(1:2, 23:28)]
getTMax(conn = mydb, countryCode = "024", Year = "2015", startDate = "2015-01-01", endDate = "2015-12-31")[1:5, c(1:2, 23:28)]
A portion of the source code for functions in the jgNutritionTools
package was developed using code from the ropensci/chirps package. We thank these developers for providing this code under the MIT licence.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.