R/plot_coef.R

#' Plot coefficients
#'
#' @param df data frame generated by broom::tidy.lm
#'
#' @return ggplot2 object
#' @export
#'
#' @examples
#' NULL
plot_coef <- function(df) {
  ggplot(df, aes(continent, estimate, color = continent)) +
    geom_violin() +
    geom_point(position = position_jitter(width=0.3)) +
    facet_wrap(~term) +
    theme_bw()
}
chapmandu2/gapminderpl documentation built on May 9, 2019, 8:42 a.m.