Skip to content

Instantly share code, notes, and snippets.

/*
* Robotics with the BOE Shield - RoamingWithIr plus LED
* Adaptation of RoamingWithWhiskers with IR object detection instead of
* contact switches.
*/
#include <Servo.h> // Include servo library
Servo servoLeft; // Declare left and right servos
Servo servoRight;
@arraytools
arraytools / biocLite.R
Last active December 10, 2015 19:48
Understand how *source("http://www.bioconductor.org/biocLite.R")* works. 1. After source("http://www.bioconductor.org/biocLite.R"), it checks R version and bioc version. 2. If it satisfies the condition (vers > "2.13" && biocVers > "2.8"), it will try to load *BiocInstaller* package. If loading BiocInstaller package is successful, then *biocLite…
## Mirrors: uncomment the following and change to your favorite CRAN mirror
## if you don't want to use the default (cran.fhcrc.org, Seattle, USA).
## options("repos" = "http://cran.fhcrc.org")
## Mirrors: uncomment the following and change to your favorite Bioconductor
## mirror, if you don't want to use the default (www.bioconductor.org,
## Seattle, USA)
## options("BioC_mirror" = "http://www.bioconductor.org")
local({
@arraytools
arraytools / server.R
Last active December 10, 2015 12:39
Heatmap using Pomeroy dataset
# shiny:::runApp("hello")
#
# To-Do-List:
# missing value case
#
library(shiny)
# library(gplots) # Just for redgreen() function. Will be replaced sol.
source(url("http://dl.dropbox.com/u/1014272/heatmapr.r"))
source(url("http://dl.dropbox.com/u/1014272/colorpanel.r"))
@arraytools
arraytools / server.R
Last active December 10, 2015 04:48
heatmap using leukemia data (22282 genes, 58 arrays). Assume 'shiny' package is available. We can run shiny:::runGist("https://gist.github.com/4383351")
# shiny:::runApp("hello")
#
# To-Do-List:
# missing value case
#
library(shiny)
# library(gplots) # Just for redgreen() function. Will be replaced sol.
source(url("http://dl.dropbox.com/u/1014272/heatmapr.r"))
source(url("http://dl.dropbox.com/u/1014272/colorpanel.r"))
@arraytools
arraytools / server.R
Last active December 10, 2015 04:38
Interactive heatmap using sequential data. Note the Google Chrome browser works fine, and Firefox may or may not. The Microsoft IE does not work at all.
library(shiny)
library(gplots) # Just for redgreen() function. Will be replaced sol.
lr2 <- as.matrix(read.delim("toy.txt", header = TRUE)) # 3 genes, 20 arrays, sequential data.
sigma <- apply(lr2, 1, sd); sigma <- sigma/max(sigma)
# Define server logic required to generate and plot a random distribution
shinyServer(function(input, output) {
datainput <- reactive(function() {
@arraytools
arraytools / foo.R
Created December 26, 2012 19:34
test gist
x <- read.delim("toy.txt", header=TRUE)
summary(x)