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 : Model-Based Geostatistical Mapping of Onchocerciais in West Africa | |
# Objective : Script to predict onchocerciais prevalence in West Africa | |
# Created by: sohanlon | |
options(echo=FALSE) | |
# | |
# | |
#/* PREAMBLE */ | |
# |
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
block | reward_claimed | max_reward | lost_satoshis | supply at block | |
---|---|---|---|---|---|
124724 | 4998999999 | 5000000000 | 1000001 | 6236249.98999999 | |
162705 | 4998300000 | 5000000000 | 1700000 | 8135299.97299999 | |
162823 | 4999900000 | 5000000000 | 100000 | 8141199.97199999 | |
162839 | 4998975200 | 5000000000 | 1024800 | 8141999.96175199 | |
162952 | 4991535267 | 5000000000 | 8464733 | 8147649.87710466 | |
162973 | 4989494061 | 5000000000 | 10505939 | 8148699.77204527 | |
162980 | 4998820406 | 5000000000 | 1179594 | 8149049.76024933 | |
162988 | 4999335613 | 5000000000 | 664387 | 8149449.75360546 | |
162992 | 4995050000 | 5000000000 | 4950000 | 8149649.70410546 |
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
#include <Rcpp.h> | |
#include <string> | |
#include <sstream> | |
using namespace Rcpp; | |
//[[Rcpp::export]] | |
NumericMatrix expandR(CharacterVector x) { | |
int n = x.size(); |
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
#Load relevant pacakges | |
library(ggplot2) | |
library(maptools) | |
library(rgeos) | |
library(plyr) | |
# Download and unzip the Natural Earth Country Polygon data | |
oldwd <- getwd() | |
tmp <- tempdir() | |
setwd(tmp) |
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
#================================== | |
# | |
# Answer to http://stackoverflow.com/q/14702714/1478381 | |
# Using R to find correlation pairs | |
# Author: Simon O'Hanlon | |
# Date: 5th February 2013 | |
# | |
#================================== | |
# Construct toy example of symmentrical matrix |
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
# Project Euler // Problem 1: | |
# Find the sum of all the multiples of 3 or 5 below 1000 | |
x <- 1:999 | |
sum( x[ x %% 5 == 0 | x %% 3 == 0 ] ) | |
# Another solution (this is really bad R practice!) could be: |
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
# Script for question posted on Stack Overflow | |
# Load relevant libraries | |
library(ggplot2) | |
library(raster) | |
library(gridExtra) | |
vplayout <- function(x, y) { | |
viewport(layout.pos.row = x, layout.pos.col = y) | |
} |