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
################################################################################ | |
# Copyright 2011 | |
# Andrew Redd | |
# 11/23/2011 | |
# | |
# Description of File: | |
# Makefile for knitr compiling | |
# | |
################################################################################ | |
all:pdf # default rule DO NOT EDIT |
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
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown) | |
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96. | |
This combination of tools provides an exciting improvement in usability for | |
[reproducible analysis](http://stats.stackexchange.com/a/15006/183). | |
Specifically, this post | |
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96; | |
(2) provides a basic example of producing console output and plots using R Markdown; | |
(3) highlights several code chunk options such as caching and controlling how input and output is displayed; | |
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and | |
(5) discusses the implications of R Markdown. |
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
#!/usr/bin/env python | |
# split a bam file by read group ID | |
# Sean Davis <seandavi@gmail.com> | |
# March 10, 2012 | |
# | |
import pysam | |
import argparse | |
import logging | |
logging.basicConfig(level=logging.INFO) |
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
# Read .mp3 files from a given directory, compare songs, and play them in order of similarity | |
# To run, source this file, then: | |
# arrangeMusicC(inDirectory = getwd()) | |
library("plyr") | |
library("tuneR") | |
library("seewave") | |
library("compiler") |
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("igraph") | |
rm(list = ls()) | |
########################################################################## | |
# Read data | |
dataSet <- read.table("http://www.vesnam.com/Rblog/wp-content/uploads/2013/07/lesmis.txt", | |
header = FALSE, sep = "\t") | |
# Create a graph. Use simplify to ensure that there are no duplicated edges or self loops | |
gD <- simplify(graph.data.frame(dataSet, directed=FALSE)) |
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("igraph") | |
library("plyr") | |
library("HiveR") | |
library("RColorBrewer") | |
library("grDevices") | |
############################################################################################ | |
rm(list = ls()) | |
dataSet <- read.table("http://www.vesnam.com/Rblog/wp-content/uploads/2013/07/lesmis.txt", |
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
dual_dendogram_tile_plot <- function(data.matrix, main="Title"){ | |
#Dual dendrogram ############ | |
x <- data.matrix | |
dd.col <- as.dendrogram(hclust(method="ward",dist(x))) | |
col.ord <- order.dendrogram(dd.col) | |
dd.row <- as.dendrogram(hclust(method="ward",dist(t(x)))) | |
row.ord <- order.dendrogram(dd.row) |
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
##### | |
## AUTHOR: BRIAN M. BOT | |
## ORGANIZATION: SAGE BIONETWORKS | |
## | |
## ALLOW USERS TO LEVERAGE KNITR WHEN CONSTRUCTING SYNAPSE WIKI CONTENT | |
##### | |
## PARAMETERS: | |
## file: path to a local .Rmd file which to knit | |
## owner: a Synapse object which will own the resulting WikiPage (usually a Project, Folder, or File) | |
## parentWikiId (optional): if the resulting WikiPage is to be a subpage of another WikiPage, this is the id for the parent WikiPage (NOTE: owner is still required) |
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
# Note: using the devel versions of both packages! | |
library(DESeq) # version 1.9.11 | |
library(edgeR) # version 2.99.8 | |
library(VennDiagram) | |
# Read in data ------------------------------------------------------------ | |
## Use pasilla data | |
datafile = system.file( "extdata/pasilla_gene_counts.tsv", package="pasilla" ) | |
datafile |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer