Skip to content

HarvardOpenData/hodp-r-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HODP R pacakge

This RHODP package contains a set of functions that are useful when creating ggplot2 plots for HODP articles. Users can access the primary, monochrome, and side-by-side HODP color palettes (see: https://github.com/HarvardOpenData/HODP-StyleGuide/blob/master/hodp-colors-typography.pdf). Users can also quickly add HODP logo to their graphs. An example plot is included below,

Example plot:

day2\ Code to generate plot above...

mtcars$cyl <- as.factor(mtcars$cyl)
ggplot(mtcars, aes(x=wt, y=mpg)) +
    geom_point(col = HODPcols('primary')[1]) +
    theme_HODP()   #HODP ggplot theme

# Add logo to existing plot...
add_HODP_logo(width = 1.5)

To install RHODP package directly from github:

Run the following in R:

#install.packages("devtools")
devtools::install_github("HarvardOpenData/hodp-r-templates")
library(RHODP)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages