You'll need to make 2 plots and use grid.arrange if you want more uniform spacing in 8.1 and 8.2. You can add a fill to strip.background to extend the background colors and rotate the text with strip.text
This file contains hidden or 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") # Must be dev version, use: devtools::install_github("hadley/ggplot2") | |
| library("gridExtra") | |
| library("extrafont") # Need to follow steps here: http://zevross.com/blog/2014/07/30/tired-of-using-helvetica-in-your-r-graphics-heres-how-to-use-the-fonts-you-like-2/ | |
| # create data frame | |
| year <- c(1760, 1790, 1797, 1850, 1860, 1889, 1900, 1910, 1950) | |
| sites <- c("Isleta", "Acoma", "Laguna", "Zuni", "Sandia", "San Felipe", | |
| "Santa Ana", "Zia", "Santo Domingo", "Jemez", "Cochiti", | |
| "Tesuque", "Nambe", "San Ildefonso", "Pojoaque", "Santa Clara", | |
| "San Juan", "Picuris", "Toas") |
This file contains hidden or 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") # Must use Dev version as of 03/18/16 | |
| library("gridExtra") | |
| library("extrafont") # for font selection | |
| library("dplyr") # for data preperation | |
| library("cowplot") # for combining plots | |
| # Prepare data for plotting | |
| # data from Zubrow, E.B.W. (1974), Population, Contact,and Climate in the New Mexican Pueblos | |
| # prepared as a long format to facilitate plotting | |
| year <- c(1760, 1790, 1797, 1850, 1860, 1889, 1900, 1910, 1950) |
This file contains hidden or 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
| ##### Visualizing keystrokes using ggplot2 ##### | |
| library(ggplot2) | |
| # a character string to visualize: | |
| string <- 'R is an integrated suite of software facilities for data manipulation, calculation and graphical display.' | |
| # a data.frame representing the keys of a qwerty keyboard | |
| qwerty <- data.frame( | |
| id = 1:53, |
This file contains hidden or 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
| i = 1 | |
| function interval() { | |
| var i = 0; | |
| setInterval(function() { | |
| if (i < 70) { | |
| console.log("The count is: " + i); | |
| animate1(i); | |
| i++; | |
| } |
This file contains hidden or 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("data.table") | |
| library("rowr") | |
| library("dplyr") | |
| library("ggplot2") | |
| library("Information") | |
| library("knitr") | |
| library("ggrepel") | |
| library("ggthemes") | |
| library("ggalt") | |
| library("xtable") |
This file contains hidden or 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
| ## http://polygraph.cool/films/ | |
| ## https://github.com/matthewfdaniels/scripts | |
| x <- "https://raw.githubusercontent.com/matthewfdaniels/scripts/master/data/character_list5.csv" | |
| characters <- read.csv(x, na.strings = c("NULL", "?"), | |
| fileEncoding = "ISO-8859-1", stringsAsFactors = FALSE) | |
| ## some ages are clearly (negative) birth years ... oops | |
| characters$age[!is.na(characters$age) & characters$age < 0] <- NA | |
| characters$age[!is.na(characters$age) & characters$age > 105] <- NA |
Nowhere near as spectacular as the Upshot/New York Times 3d yield curve by Amanda Cox and Gregor Aisch, but not bad at all for a couple of lines of R code with the plotly htmlwidget.
library(plotly)
library(dplyr)
library(tidyr)
library(purrr)
library(quantmod)
library(magrittr)
This file contains hidden or 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(rvest) | |
| library(urltools) | |
| library(rmarkdown) | |
| # Some Rmd template setup ----------------------------------------------------------- | |
| preamble <- '--- | |
| title: "CRAN Mirrors Certificate Expiration Dashboard (Days left from %s)" | |
| output: | |
| flexdashboard::flex_dashboard: |