library(ggplot2)
library(grDevices)
library(RColorBrewer)
library(rlang)
library(magrittr)
library(dplyr)
library(tibble)
library(rlang)
library(stats)
library(tidyr)
# Plot the Total Dairy component score from the 2005-06 NHANES data using the
# "Simple" method.
dairy_plot <- plotScore(graph = "Histogram",
scoringMethod = "Simple",
years = "0506",
heiComponent = "Total Dairy")
dairy_plot
# Create a radar plot to display the total HEI score by race/ethnicity using
# the mean ratio method for subjects that are male, more than 50 years old,
# with a family income in the range [65000, 75000) for the 2015-16 NHANES
# cycle.
radar_example_plot <- plotScore(graph = "Radar",
scoringMethod = "Mean Ratio",
years = "1516",
heiComponent = "Total Score",
demographicGroup = "Race/Ethnicity",
sex = "Male",
age = c(50, 150),
familyIncome = "[65000, 75000)")
radar_example_plot
Run the code above in your browser using DataLab