Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
| library(ggplot2) | |
| source('geom_font_awesome.R') | |
| shapes_map = c( | |
| setosa = 'car', | |
| virginica = 'ban', | |
| versicolor = 'star' | |
| ) | |
| ( |
| # 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) |
| #!/usr/bin/env Rscript | |
| suppressPackageStartupMessages({ | |
| library(globals) | |
| library(readr) | |
| library(stringr) | |
| library(rex) | |
| library(magrittr) | |
| library(rlang) | |
| library(knitr) |
| # 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) |
| # 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 |
| 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 |
| # Get a person's name, location, summary, # of connections, and skills & endorsements from LinkedIn | |
| # URL of the LinkedIn page | |
| user_url <- "https://www.linkedin.com/in/daattali" | |
| # since the information isn't available without being logged in, the web | |
| # scraper needs to log in. Provide your LinkedIn user/pw here (this isn't stored | |
| # anywhere as you can see, it's just used to log in during the scrape session) | |
| username <- "yourusername" | |
| password <- "yourpassword" |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
| scale_x_discrete(limits = rev(levels(the_factor))) |
| SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md)) | |
| HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md)) | |
| all : $(SLIDES) $(HANDOUTS) | |
| %.md.slides.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -o $@ | |
| %.md.handout.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -V handout -o $@ |