knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
This package mainly contains wrapper functions around ggplot2.
You can install dataplotr from github with:
# install.packages("devtools") devtools::install_github("aotearoastats/dataplotr")
Plot_barplot plots simple barplots with the option to add a grid. See ?plot_barplot for documentation.
library(dataplotr) library(dplyr) iris.plot <- iris %>% group_by(Species) %>% summarize(Sepal.Length=mean(Sepal.Length)) plot_barplot(iris.plot, main_title="Sepal.Length by Species on the Iris Data Set", x_var = "Species", y_var = "Sepal.Length", fill_title = "Species", fill_vars = "Species", colour_vars = "rev(Species)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.