Simple set of personal R functions. I like this better than my .Rprofile because I can keep it synced over many devices easier.
Custom fonts are still giving me trouble but I'm working on it.
devtools::install_github("jamesfeigenbaum/jjfPkg")
setwd("G:/Dropbox/Research/_KnowledgeBase/jjfPkg/")
devtools::document()
devtools::build()
devtools::check()
library(tidyverse)
library(extrafont)
library(jjfPkg)
ggplot(cars, aes(x = dist, y = speed)) +
geom_point() +
theme_jjf()
# same as above, roboto Condensed is the default
ggplot(cars, aes(x = dist, y = speed)) +
geom_point() +
theme_jjf(font = "Roboto Condensed")
ggplot(cars, aes(x = dist, y = speed)) +
geom_point() +
theme_jjf(font = "CMU Sans Serif")
x <- c("New York", "Virginia")
state.fips[match(x, state.name)]
state.icpsr[match(x, state.name)]
state.ipums.bpl[match(x, state.name)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.