This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: "[Title Goes Here]" | |
author: "[Blinded for Review]" | |
documentclass: "article" | |
output: | |
pdf_document: | |
keep_tex: true | |
number_sections: true | |
highlight: "tango" | |
toc: true | |
md_extensions: +implicit_figures +grid_tables +fenced_code_blocks +fenced_code_attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Early in the script | |
pkgs_pre_script <- try(devtools::loaded_packages(), silent = TRUE) | |
# Late in the script | |
pkgs_used_during_script <- try(devtools::loaded_packages(), silent = TRUE) | |
cat("* ") | |
print(citation(), style="text") # or Bibtex or LaTeX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat | |
# Originally seen at http://spatial.ly/2014/08/population-lines/ | |
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess, | |
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after | |
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line. | |
# The result of the code below can be seen at http://imgur.com/ob8c8ph | |
library(tidyverse) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
suppressPackageStartupMessages({ | |
library(globals) | |
library(readr) | |
library(stringr) | |
library(rex) | |
library(magrittr) | |
library(rlang) | |
library(knitr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gelman and Hill 2007: Chapter 3 Regression Examples | |
# Using ggplot and estimatr | |
rm(list = ls()) | |
# Uncomment to install | |
# install.packages("ggplot2") | |
# install.packges("haven") | |
# install.pacakges("estimatr") | |
library(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
source('geom_font_awesome.R') | |
shapes_map = c( | |
setosa = 'car', | |
virginica = 'ban', | |
versicolor = 'star' | |
) | |
( |
OlderNewer