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
# get list of wikileaks files and directories | |
library(rvest) | |
wl <- read_html("https://file.wikileaks.org/file/") | |
# get file/directory names & clean a little | |
wllt <- | |
wl %>% | |
# Get text of URLS | |
html_nodes("a") %>% | |
html_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
############################################################################## | |
## ## | |
## FORMATSNIPPETS.R ## | |
## ggplot format snippets ## | |
## ## | |
############################################################################## | |
#### LABELS #### | |
# Hide labels |
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
# Assuming we are in the directory with the docs | |
# get a list of the files | |
the_docs <- list.files(pattern = ".doc$") | |
# remove spaces from the file names | |
file.rename(the_docs, gsub(" ", "_", the_docs)) | |
# get the file names again | |
the_docs <- list.files(pattern = ".doc$|docx$") |
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
--- | |
title: "What are the most frequently used statistical tests?" | |
author: "Ben Marwick" | |
date: "March 31, 2016" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE, | |
warning = FALSE, |
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
#' Polygon vertices for plotting computed from an object's linear dimensions | |
#' | |
#' This function takes a data frame (one row per object) of object dimensions, | |
#' where each object is defined by five linear measurements, and computes coords | |
#' of polygon vertices at given x and y values (taken from the data frame) | |
#' | |
#' @param data data frame with at least seven numeric columns | |
#' @param x column for x position of polygon centers |
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
#' Making several text files from a single CSV file | |
#' | |
#' Convert a single CSV file (one text per row) into | |
#' separate text files. A function in R. | |
#' | |
#' To use this function for the first time run: | |
#' install.packages("devtools") | |
#' then thereafter you just need to load the function | |
#' fom github like so: | |
#' library(devtools) # windows users need Rtools installed, mac users need XCode installed |
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
/* 1200px Media Query for the Skeleton Grid - http://getskeleton.com | |
* Adapted from http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/responsive-css-grid-systems-345 | |
* Added .alpha.omega combo classes. Hope to see that fixed in later versions of Skeleton: https://github.com/dhgamache/Skeleton/issues/68 | |
*/ | |
@media only screen and (min-width: 1200px) { | |
.container { width: 1200px;} | |
.container .column, | |
.container .columns { margin-left: 10px; margin-right: 10px; } | |