Skip to content

Instantly share code, notes, and snippets.

View lcolladotor's full-sized avatar

Leonardo Collado-Torres lcolladotor

View GitHub Profile
@lcolladotor
lcolladotor / document-derfinder.R
Created November 13, 2013 18:51
Commands I use frequently when building the derfinder package. I save it on the directory, say WDIR, where WDIR/derfinder is located at.
library(devtools)
## Create the documentation fresh
document("derfinder", clean=TRUE)
## Install the package
install("derfinder")
## Check the help
library(derfinder)
help(package=derfinder)
@lcolladotor
lcolladotor / runApproach1b.sh
Last active May 31, 2020 15:14
Testing differing approaches for reducing the memory load when using mclapply in R.
#!/bin/bash
#$ -cwd
#$ -l jabba,mem_free=10G,h_vmem=2G,h_fsize=1G
#$ -N approach1b
#$ -pe local 20
#$ -m e
echo "**** Job starts ****"
date
@lcolladotor
lcolladotor / knit-with-knitrBootstrap textmate
Created December 10, 2013 01:26
Knit with knitrBoostrap using textmate
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# Source some support functions we need.
. "${TM_SUPPORT_PATH}/lib/html.sh"
. "${TM_SUPPORT_PATH}/lib/webpreview.sh"
# Get the viewer program. Any program (that works with open -a <name>) can be used,
# except 'html' which is reserved to mean the internal HTML window. This is also the
# default option.
@lcolladotor
lcolladotor / .bashrc-cluster
Last active December 30, 2015 22:49
Local and cluster .bashrc files for "Login to the cluster, request a node and change to your project directory in a single command" as described in http://bit.ly/FellBit
## change dir automatically when using qrsh
## Details: https://github.com/rkostadi/BiocHopkins/wiki/Useless-Tips-&-Code-Snippets
if [ -f ~/.bash_pwd ]; then
source ~/.bash_pwd
rm ~/.bash_pwd
fi
alias qr='echo "cd $PWD" > ~/.bash_pwd; history -w; qrsh'
@lcolladotor
lcolladotor / pabloCode.R
Last active January 1, 2016 21:29
pablo's 2013 gift code
## Initialization of j
j <- 0
for(i in seq(from=1, to=10, by=1)) {
## Note that x %% y is
## x mod y
## Pre-evaluation of j
j <- j + i %% 2
## Post-evaluation of j
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>contactEmailRot13</key>
<string>chris.fonnesbeck@vanderbilt.edu</string>
<key>contactName</key>
<string>Chris Fonnesbeck</string>
<key>description</key>
<string>Dynamic report generation in R</string>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>saveActiveFile</string>
<key>command</key>
<string>#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
R Markdown test
===============
# Title 1
## Title 2
### Title 3
#### Title 4
Headings work.
@lcolladotor
lcolladotor / index.html
Created February 26, 2014 02:22
test publish
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://d3js.org/topojson.v1.min.js' type='text/javascript'></script>
<script src='http://datamaps.github.io/scripts/datamaps.all.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js' type='text/javascript'></script>
@lcolladotor
lcolladotor / index.html
Created February 26, 2014 02:24
test publish 2
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script>
<script src='http://d3js.org/topojson.v1.min.js' type='text/javascript'></script>
<script src='http://datamaps.github.io/scripts/datamaps.all.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.min.js' type='text/javascript'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js' type='text/javascript'></script>