This file contains 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
Working-Papers | |
At present, Mendeley does not support the use of the Institution and Series field which | |
are used in the Working-Paper and Report style. We can only hope that support is added | |
for this is in the future. | |
In the meantime, correct bibliography entries for the style... | |
Arcand, J., Berkes, E. & Panizza, U. (2012). Too much finance? | |
IMF Working Papers. WP/12/161. IMF, Washington DC |
This file contains 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
\documentclass{article} | |
\usepackage{hyperref} | |
\begin{document} | |
\section{Info} | |
Solution to \href{http://stackoverflow.com/questions/30309311/error-in-applying-a-for-loop-to-an-xtable-in-knitr}{this} Stack Overflow post. Tested with \texttt{xtable} version 1.7-4 on: |
This file contains 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: "To draw a map" | |
author: "Matthew Upson" | |
date: "10 September 2015" | |
output: pdf_document | |
--- | |
[http://stackoverflow.com/questions/32466608/accessing-the-internet-with-knitr](http://stackoverflow.com/questions/32466608/accessing-the-internet-with-knitr) | |
This file contains 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
# Load packages including ggplot2 | |
library(dplyr) | |
library(purrr) | |
library(ggplot2) | |
# Follow example as at: https://github.com/hadley/purrr/blob/master/README.md | |
random_group <- function(n, probs) { |
This file contains 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(mnormt) | |
mycols <- topo.colors(100,0.5) | |
xhat <- c(0.2, -0.2) | |
Sigma <- matrix(c(0.4, 0.3, | |
0.3, 0.45), ncol=2) | |
x1 <- seq(-2, 4,length=151) | |
x2 <- seq(-4, 2,length=151) | |
f <- function(x1,x2, mean=xhat, varcov=Sigma) | |
dmnorm(cbind(x1,x2), mean,varcov) | |
z <- outer(x1,x2, f) |
This file contains 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
#!/bin/bash | |
cat urls-august.csv | tr "\r" "\n" > urls-august-unix.csv | |
mv urls-august-unix.csv urls-august.csv |
This file contains 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
# Have a look at rle in the console. This function is largely bastardised from | |
# it. I have used a testing framework testthat to ensure that the outcome is | |
# what we expect it to be. You can add more tests as required! | |
# Define the max_rl function ---- | |
max_rl <- function(x, val) { | |
# x is the target vector, val is the value for which we want to know the longest | |
# run length. |
This file contains 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(plyr) | |
library(dplyr) | |
# Create a vector of numbers | |
num_vec <- round(runif(n = 100, min = 1, max = 26)) | |
# Convert these to letters using the inbuilt letters vector | |
letter_vec <- letters[num_vec] |
This file contains 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
#export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# Shorten and colour command prompt | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ ' | |
fi |
This file contains 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
#export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# Shorten and colour command prompt | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ ' | |
fi |
OlderNewer