knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

themeatsu

The goal of themeatsu is to create a standard theme for statistical analysis reports done at AT Still University department of Research Support.

Installation

You can install the development version of themeatsu from GitHub with:

# install.packages("devtools")
devtools::install_github("brunkgr2/themeatsu")

Example 1

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)

Example 2

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)


brunkgr2/themeatsu documentation built on April 26, 2022, 3:21 a.m.