This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
## reproduce the figures from http://www.jstatsoft.org/v28/c01/paper using ggplot2 | |
library(ggplot2) | |
## parameters | |
set.seed(2710) | |
## Figure 1 | |
d <- rnorm(50) |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
--- | |
title: "twee demo" | |
author: "Jenny Bryan" | |
date: "17 August, 2014" | |
output: | |
html_document: | |
toc: TRUE | |
keep_md: TRUE | |
--- |
library(knitr) | |
opts_chunk$set(collapse=TRUE, echo=TRUE, | |
error=FALSE, message=FALSE, | |
warning=FALSE, cache=FALSE) | |
s0 <- knitr::knit_hooks$get('source') | |
o0 <- knitr::knit_hooks$get('output') | |
p0 <- knitr::knit_hooks$get('plot') | |
knitr::knit_hooks$set( |
county | sample | state | name | exceedances | |
---|---|---|---|---|---|
Mobile | 20 | al | Dauphin Island Water & Sewer | 1 | |
Monroe | 23 | al | Excel Water System | 1 | |
Washington | 95 | al | Tate & Lyle Sucralose, Inc. Water System | 1 | |
Coosa | 18.3 | al | Lake Mitchell Water, Incorporated | 1 | |
Juneau City and Borough | 15.5 | ak | Thunder Mountain Mobile Park | 1 | |
Juneau City and Borough | 31 | ak | Hecla Greens Creek Hawk Inlet | 1 | |
Ketchikan Gateway Borough | 27.7 | ak | Boyer Towing | 1 | |
Ketchikan Gateway Borough | 32.9 | ak | Thorne Bay, City Of | 1 | |
Ketchikan Gateway Borough | 16.2 | ak | Clover Pass Christian School | 2 |
games.howell <- function(grp, obs) { | |
#Create combinations | |
combs <- combn(unique(grp), 2) | |
# Statistics that will be used throughout the calculations: | |
# n = sample size of each group | |
# groups = number of groups in data | |
# Mean = means of each group sample | |
# std = variance of each group sample |
library(magick) | |
library(magrittr) | |
# Convert to 'ico' format | |
image_read("https://www.r-project.org/logo/Rlogo.png") %>% | |
image_scale("32x32!") %>% # remove the "!" after 32x32 to scale proportionally | |
image_write("favicon.ico", format = "ico") | |
# Favicon can also be png/gif |
# WMF only: | |
if (file.exists("/etc/wikimedia-cluster")) { | |
message('Detected that this script is being run on a WMF machine ("', Sys.info()["nodename"], '"). Setting proxies...') | |
Sys.setenv("http_proxy" = "http://webproxy.eqiad.wmnet:8080") | |
Sys.setenv("https_proxy" = "http://webproxy.eqiad.wmnet:8080") | |
} | |
# General use: | |
message("Checking for a personal library...") | |
if (!dir.exists(Sys.getenv("R_LIBS_USER"))) { |
download.file("https://ndownloader.figshare.com/articles/5170705/versions/1", "kd.zip") | |
unzip("kd.zip") | |
library(readr) | |
words <- readr::read_csv("KSP-Word.csv") | |
users <- readr::read_csv("KSP-User.csv") | |
entries <- readr::read_csv("KSP-Entry.csv") | |
keypress <- readr::read_csv("KSP-KeyPress.csv") | |
pressure <- readr::read_csv("KSP-Pressure.csv") |