knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of themeatsu is to create a standard theme for statistical analysis reports done at AT Still University department of Research Support.
You can install the development version of themeatsu from GitHub with:
# install.packages("devtools") devtools::install_github("brunkgr2/themeatsu")
This is a basic example which shows you how to use ATSU colors:
library(themeatsu) library(ggplot2) options(scipen=999) data("midwest", package = "ggplot2") theme_set(theme_atsu()) gm <- ggplot(midwest, aes(x=area, y=poptotal)) + geom_point(aes(col=state, size=popdensity)) + geom_smooth(method="loess", se=F, col = rand_pal(1)) + xlim(c(0, 0.1)) + ylim(c(0, 500000)) + labs(title="Area Vs Population", y="Population", x="Area", caption="Source: midwest") + scale_color_atsu(palette = "main", discrete = TRUE) plot(gm) gb <- ggplot(midwest, aes(x=area, y=poptotal)) + geom_point(aes(col=state, size=popdensity)) + geom_smooth(method="loess", se=F, col = rand_pal(1)) + xlim(c(0, 0.1)) + ylim(c(0, 500000)) + labs(title="Area Vs Population", y="Population", x="Area", caption="Source: midwest") + scale_color_atsu(palette = "blues", discrete = TRUE) plot(gb) gg <- ggplot(midwest, aes(x=area, y=poptotal)) + geom_point(aes(col=state, size=popdensity)) + geom_smooth(method="loess", se=F, col = rand_pal(1)) + xlim(c(0, 0.1)) + ylim(c(0, 500000)) + labs(title="Area Vs Population", y="Population", x="Area", caption="Source: midwest") + scale_color_atsu(palette = "mke", discrete = TRUE) plot(gg)
This is a basic example which shows you how to use fix_names():
library(themeatsu) data(iris) names(iris) names(iris) <- fix_names(names(iris), patterns = c("."), replacements = c("_"), case = "lower") names(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.