pdf2 | R Documentation |
Overlay two simple histograms, for data below vs above a cutoff
pdf2(x, binx, threshold, n = 100, colors = c("gray", "red"), ...)
x |
Variable for histogram |
binx |
Variable that defines subsets |
threshold |
Variable that defines cutoff, so binx<threshold is plotted first, in one color, then binx>=threshold in other color is drawn over that |
n |
Default is 100. n is just passed to the hist function. |
colors |
Character vector length 2, with colors for first and second histogram |
... |
Other named parameters sent to hist, such as main, xlab, ylab |
Just plots using hist.
## Not run:
e <- bg$pm[!is.na(bg$pm)]
dpct <- bg$pctmin
dcount <- bg$pop[!is.na(bg$pm)] * dpct[!is.na(bg$pm)]
refcount <- bg$pop[!is.na(bg$pm)] * (1 - dpct[!is.na(bg$pm)])
brks <- 0:17
etxt <- 'PM2.5'
dtxt <- 'Minorities'
pop.cdf( e, pcts = dpct, pops = bg$pop)
pop.cdf2( e, dcount, refcount, etxt, dtxt, brks)
pop.cdf.density(e, dcount, refcount, etxt, dtxt )
pdf2(
log10(bg$proximity.npl),
bg$bin.EJ.DISPARITY.proximity.npl.eo, 10,
main ='npl for high top 10 pct vs low EJ', xlab='NPL score log10'
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.