This package makes binned scatter plots. They're all the rage these days!
Using the devtools package:
devtools::install_github("shommazumder/binscatteR")
This package is just one function binscatter
. Here's how to use it:
binnedout <- binscatter(
data = df,
x = "x",
y = "y"
)
The function will automatically detect if the independent variable is discrete or continuous for you. Optional arguments such as numbins
, se
, and smooth
control the number of bins to use for continuous variables, estimate/plot standard errors for the binned means, and plot the loess smoother respectively.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.