Skip to content

Instantly share code, notes, and snippets.

View oganm's full-sized avatar
🤦‍♂️

B. Ogan Mancarcı oganm

🤦‍♂️
View GitHub Profile
@oganm
oganm / plotting
Last active August 29, 2015 14:22
Double stdev plot
require(ggplot2)
require(stringr)
halo = read.table('Halo-Size.txt', header= T)
dry = read.table('Dry-Mass.txt', header =T)
# calculation of standard deviation
haloError = qnorm(0.975) * apply(halo, 2, sd)/sqrt(apply(halo, 2, length))
@oganm
oganm / Readme.md
Last active September 11, 2015 20:14 — forked from timelyportfolio/Readme.md
igraph in DiagrammeR

In response to this tweet

@riannone @abresler @timelyportfolio this popped into my head last week, how hard would it be to dump an igraph or graphNEL into diagrammeR?

— Tim Triche, Jr. (@timtriche) February 24, 2015
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

I made this little Gist. It illustrates one way to git an igraph into DiagrammeR using grViz. One way to use igraph with mermaid can be seen in this Gist R ( igraph + DiagrammeR + pipeR +htmltools ) + JS ( mermaid.js + d3.js + dagre-d3.js ).

Full attribute customization will probably not be possible with these two

require(RSelenium)
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4444, browserName = "firefox")
remDr$open()
remDr$getStatus()
remDr$navigate("https://upassbc.translink.ca/")
---
title: "Quicky and dirty: side-by-side plot and table"
author: "Omar AlOmeir"
output:
github_document
---
```{r}
library(ggplot2)
suppressMessages(library(dplyr))
@oganm
oganm / explicit.R
Last active January 7, 2017 16:14
library(dplyr)
library(magrittr)
baseR = c('base','compiler','datasets','graphics','grDevices','grid','methods','parallel','splines','stats','stats4','tcltk','utils')
explicit = function(fileIn,fileOut,
ignore = baseR){
file = readLines(fileIn)
# if added to a shiny server, fixes the range of the slider to a predetermined length
oldSliderCoordinates = reactiveValues(range1 = data$date %>% max %>% subtract(sliderSize), # initial slider location 1
range2 = data$date %>% max) # initial slider location 2
observe({
range = input$dateRange[2] - input$dateRange[1]
range %<>% as('numeric')
if(range > sliderSize){
if(input$dateRange[2]!= oldSliderCoordinates$range2){
#!/usr/bin/env Rscript
library(magrittr)
library(reshape2)
d <- read.csv("FINAL LAB DATA Mar 23 2017.csv", colClasses="character", fileEncoding = "UTF-8-BOM")
d <- d[order(d$ID),]
# assign each visit a number (per patient)
visit.numbers <- tapply(d$Collection.Date, d$ID, function (x)
{
"data": [
{
"name": "050512MJA_U133_2.0_IB29.CEL",
"description": "",
"sequencePairedReads": null,
"sequenceReadCount": null,
"sequenceReadLength": null,
"outlier": false,
"metadata": null,
@oganm
oganm / lazyShreejoy.R
Created October 26, 2017 03:18
marker heatmap for shreejoy
devtools::install_github('oganm/neuroExpressoAnalysis')
library(neuroExpressoAnalysis)
devtools::install_github('oganm/ogbox')
library(ogbox)
devtools::install_github('oganm/markerGeneProfile')
library(markerGeneProfile)
library(scales)
library(gplots)
library(stringr)