Skip to content

Instantly share code, notes, and snippets.

View raffdoc's full-sized avatar

Rafik Margaryan raffdoc

View GitHub Profile
@raffdoc
raffdoc / bowelCancer.Rnw
Created November 5, 2011 21:44 — forked from psychemedia/bowelCancer.Rnw
Sweave script documenting the production of a funnel plot
\documentclass[a4paper]{article}
\SweaveOpts{echo=FALSE, keep.source=TRUE}
\usepackage{a4wide}
\usepackage{color}
\usepackage{hyperref}
\begin{document}
\section{Example of self-documenting data journalism notes}
This is an example of using Sweave to combine code and output from the R statistical programming environment and the LaTeX document processing environment to generate a self-documenting script in which the actual code used to do stats and generate statistical graphics is displayed along the charts it directly produces.
@raffdoc
raffdoc / phylometa_fxn.R
Created August 18, 2011 08:07 — forked from sckott/phylometa_fxn.R
Conduct phylogenetic meta-analysis from R calling Phylometa - These are functions needed in the code in file phylometa_inR_run.R.
#####################################################################
# Created by Scott Chamberlain
# Ecology and Evolutionary Biology Dept., Rice University
# Houston, TX 77005, USA
# [email protected]
#####################################################################
# Function to split confidence intervals, this function is required in the below functions
CI_split <- function(a){
dd<-c(gsub("\\(","",unlist(strsplit(a[5],","))[1]),gsub("\\)","",unlist(strsplit(a[5],","))[2]))