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
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
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(shiny) | |
library(miniUI) | |
library(gmailr) | |
library(rtweet) | |
library(purrr) | |
use_secret_file("~/client_id.json") | |
send_email <- function(to_address, picture_url, msg = "", | |
subject = "Cute Picture", expanded_url = picture_url){ |
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
p <- plot_ly(mtcars, x = ~wt) %>% | |
add_markers(y = ~mpg, name = "A") %>% | |
add_markers(y = ~hp, name = "B", visible = F) %>% | |
layout( | |
title = "Drop down menus - Update", | |
xaxis = list(domain = c(0.1, 1)), | |
yaxis = list(title = "mpg"), | |
updatemenus = list( | |
list( | |
y = 0.7, |
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
## Adapted from r-lib/pkgdown source code from RStudio https://github.com/r-lib/pkgdown | |
## Helper functions, directly from pkgdown code -------------------------------- | |
git <- function(...) { | |
processx::run("git", c(...), echo_cmd = TRUE, echo = TRUE) | |
} | |
github_clone <- function(dir, repo_slug) { | |
remote_url <- sprintf("[email protected]:%s.git", repo_slug) | |
cli::rule("Cloning existing site", line = 1) |
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
--- | |
title: "event listener bug" | |
author: "Alicia Schep" | |
date: "April 11, 2018" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = 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
get_r_files <- function(path = ".", recursive = FALSE, include_rmd = TRUE){ | |
all_files <- normalizePath(list.files(path, full.names = TRUE, | |
recursive = recursive)) | |
r_files <- grep(".*\\.(r|R)$", all_files, value = TRUE) | |
if (include_rmd){ | |
r_files <- c(r_files, | |
grep(".*\\.(r|R)md$", all_files, value = 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
create_lib_dir <- function(name, path = "."){ | |
dir_path <- file.path(path, name) | |
if (!dir.exists(dir_path)) { | |
message("Creating new dir: ", dir_path) | |
dir.create(dir_path) | |
} | |
normalizePath(dir_path) | |
} |
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
setClass("DummyClass", | |
slots = c(y = "numeric")) | |
setClass("SpecialClass", | |
slots = c(x = "numeric"), | |
contains = c("DummyClass")) | |
setClass("SpecialList", |
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(GenomicRanges) | |
library(S4Vectors) | |
# Footprint does not include +/- 4 correction for ATAC-seq | |
# Modified tabulate funcion ---------------------------------------------------- | |
tabulate2 <- function(x, min_val, max_val) { | |
if (max_val <= min_val) { | |
stop("max_val must be greater than min_val") |
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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"description": "Two horizonally concatenated charts that show a histogram of precipitation in Seattle and the relationship between min and max temperature.", | |
"data": { | |
"url": "data/weather.csv", | |
"format": { | |
"type": "csv" | |
} | |
}, | |
"transform": [ |
NewerOlder