Skip to content

Instantly share code, notes, and snippets.

library(tidyverse)


# Geom creation -----------------------------------------------------------
StatParallelSlopes <- ggproto(
  "StatParallelSlopes", Stat,
  
  required_aes = c("x", "y"),
  
pkg_df <- devtools::session_info() %>%
purrr::pluck("packages")
pkg_df %>%
purrr::walk2(.x = .$package,
.y = .$loadedversion,
.f = remotes::install_version,
dependencies = NA,
upgrade = "ask")
library(nycflights13)
library(tidyverse)
library(stringr)
# devtools::install_github("ismayc/infer")
library(infer)
set.seed(2017)
fli_small <- flights %>%
na.omit() %>%
sample_n(size = 10000) %>%
mutate(half_year = case_when(
library(okcupiddata)
library(stringr)
# devtools::install_github("andrewpbray/infer")
library(infer)
library(dplyr)
library(ggplot2)
set.seed(2017)
prof_small <- profiles %>%
sample_n(size = 500) %>%
mutate(frisco = case_when(
---
title: "Example Document"
author: "Your name here"
output:
bookdown::gitbook
---
# Chap 1
## Sec 1
@ismayc
ismayc / app.R
Created October 4, 2016 17:44
Shiny App for Checking n, p assumptions
library(shiny)
inputPanel(
numericInput("n", label = "Sample size:", value = 300),
sliderInput("p", label = "Population proportion:",
min = 0, max = 1, value = 0.1, step = 0.01),
numericInput("x_min", label = "Min for x-axis:", value = 0, min = 0, max = 1),
numericInput("x_max", label = "Max for x-axis:", value = 1, min = 0, max = 1)
)
---
title: "Babynames (Parameterized)"
author: "Chester Ismay"
date: "August 17, 2016"
output:
html_document:
toc: true
toc_float: true
code_folding: show
code_download: true
@ismayc
ismayc / test-knitr.Rmd
Last active April 21, 2016 17:56
Testing the new `caption.short` argument in `knitr::kable`
---
output: pdf_document
lot: true
---
# R Markdown Basics {#rmd-basics}
## Loading and exploring data
Included in this template is a link to a file called `flights.csv`. This file includes a subset of the larger dataset of information about all flights that departed from Seattle and Portland in 2014. More information about this dataset and its **R** package is available at <http://github.com/ismayc/pnwflights14>. This subset includes only Portland flights and only rows that were complete with no missing values. Merges were also done with the `airports` and `airlines` data sets in the `pnwflights14` package to get more descriptive airport and airline names.
@ismayc
ismayc / lookup_tables.Rmd
Last active March 28, 2016 04:27
A way to use `dplyr`'s `join` functions to extract data from a lookup table
---
title: "Lookup Tables"
output:
html_document:
toc: true
toc_float: true
---
```{r setup, include=FALSE}