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
| d3 = function() { | |
| var d3 = { | |
| version: "3.2.7" | |
| }; | |
| if (!Date.now) Date.now = function() { | |
| return +new Date(); | |
| }; | |
| var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; | |
| try { | |
| d3_document.createElement("div").style.setProperty("opacity", 0, ""); |
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
| # RNA-seq: differential gene expression analysis | |
| *[back to course contents](..)* | |
| This is an introduction to RNAseq analysis involving reading in count data from an RNAseq experiment, exploring the data using base R functions and then analysis with the DESeq2 package. | |
| ## Install and load packages | |
| First, we'll need to install some add-on packages. Most generic R packages are hosted on the Comprehensive R Archive Network (CRAN, <http://cran.us.r-project.org/>). To install one of these packages, you would use `install.packages("packagename")`. You only need to install a package once, then load it each time using `library(packagename)`. Let's install the **gplots** and **calibrate** packages. |
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
| ## See http://gettinggeneticsdone.blogspot.com/2013/06/customize-rprofile.html | |
| ## Load packages | |
| library(BiocInstaller) | |
| ## Don't show those silly significanct stars | |
| options(show.signif.stars=FALSE) | |
| ## Do you want to automatically convert strings to factor variables in a data.frame? | |
| ## WARNING!!! This makes your code less portable/reproducible. |
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
| library(ganalytics) | |
| library(plyr) | |
| library(ggplot2) | |
| ########################################### | |
| # Change profileId to your own GA profile # | |
| ########################################### | |
| gaQuery <- GaQuery(profileId = 123456789) | |
| # Define our date range - end date is yesterday by default |
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
| #### Demos in R | |
| ## see available demos by package | |
| demo(package = .packages(all.available = TRUE)) | |
| ##### demos in 'HH' | |
| demo('likert-paper-noFormula', package='HH') | |
| demo('likert-paper',package="HH") | |
| demo(topic='likertMosaic-paper', package = "HH") | |
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
| # By default, the directories in .libPaths() aren't writable on shinyapps.io, so | |
| # create a subdir where we'll install our package. | |
| if (!file.exists("R-lib")) { | |
| dir.create("R-lib") | |
| } | |
| # Unfortunately, there's no way to get deployapp() to ignore this directory, so | |
| # make sure to remove it locally before you call deployapp(). This can be done | |
| # with: | |
| # unlink("pkgInst/R-lib", recursive = TRUE) |
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
| * Reproducible Research | |
| * Makefiles | |
| * [Make for Reproducibility](http://zmjones.com/make/) | |
| * [Why use Make](http://bost.ocks.org/mike/make/) | |
| * [O'Reilly Make Book](http://oreilly.com/catalog/make3/book/) | |
| * [Minimal Make, A Quick Tour](http://kbroman.org/minimal_make/) | |
| * [Make for R and LaTeX](http://robjhyndman.com/hyndsight/makefiles/) | |
| * [Software Carpentry Make Lessons](http://software-carpentry.org/v4/make/index.html) | |
| * Misc | |
| * [Best Practices for Software and Reproducible Research](http://openresearchsoftware.metajnl.com/article/view/jors.ay/63) |
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
| ############################################################################### | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| # GNU General Public License for more details. |
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
| R-Code | |
| ====== |
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
| require("shiny") | |
| require("foreign") | |
| #Then simply run: | |
| shiny:::runGist("https://gist.github.com/SachaEpskamp/5796467") |
NewerOlder