statestats_means - convenient way to see STATE MEANS of ENVIRONMENTAL and RESIDENTIAL POPULATION indicators
Source:R/statestats_query.R
statestats_means.Rdstatestats_means - convenient way to see STATE MEANS of ENVIRONMENTAL and RESIDENTIAL POPULATION indicators
Usage
statestats_means(
ST = unique(EJAM::statestats$REGION),
varnames = c(EJAM::names_e, EJAM::names_d, EJAM::names_d_subgroups_nh),
PCTILES = "mean",
dig = 4
)Value
numeric matrix with one row per indicator in varnames and one column per state in ST (ST may contain repeats; columns follow the order of ST).
Examples
# \donttest{
# indicators as rows, one column per state
statestats_means(ST = c("MD", "VA"), varnames = EJAM::names_e[1:3])
# ST may repeat (e.g. one entry per site) - one column per element, values stay numeric
m <- statestats_means(ST = c("MD", "MD", "VA"), varnames = EJAM::names_e[1:3])
m[EJAM::names_e[1:3], ]
# }