Start by loading the NHANES
data and dplyr
package.
library(dplyr)
library(NHANES)
data(NHANES)
Gender
) between the ages of " 40-49"
(AgeDecade
), make a summary to compare the mean of the systolic blood pressure (BPSysAve
) grouped by race (Race1
, which is already in the NHANES dataframe). Order the resulting table from lowest to highest mean systolic blood pressure. Store the result in a data frame summary_by_race
. It should have a Race1
and a mean_BP
column.