plot_demogshare_by_distance - work in progress
Source:R/plot_demogshare_by_distance.R
plot_demogshare_by_distance.Rd
plot_demogshare_by_distance - work in progress
Usage
plot_demogshare_by_distance(
results_bybg_people,
demogvarname = names_d[1],
myids = unique(results_bybg_people$ejam_uniq_id),
show.lowess = F,
show.lm = TRUE,
show.line = TRUE,
...
)
Arguments
- results_bybg_people
table as from ejamit()$results_results_bybg_people, like testoutput_ejamit_10pts_1miles$results_bybg_people
- demogvarname
one of the column names of results_bybg_people, such as one of names_d like "Demog.Index.Supp"
- myids
optional vector of ejam_uniq_id values
- show.lowess
whether to show curve fitted via graphics::lines(stats::lowess(x,y)) using
stats::lowess()
- show.lm
whether to show straight line fitted via
stats::lm()
- show.line
whether to show straight line fitted via stats::coef(line(x,y)) using
stats::coef()
andstats::line()
- ...
passed to
plot()
Details
Could also consider plotting something like boxplot(demogvar ~ round(distance, 1))
See notes on plots at plot_barplot_ratios()