Chomp <- R6::R6Class(
"chomp",
public = list(
string = "",
current = "",
result = list(),
initialize = function(string) {
self$string <- string
self$current <- string
This file contains 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
gist_to_carbon <- function( | |
gist_id, | |
file = "code.png", | |
bg = "#4A90E2", | |
bg_alpha = 1, | |
theme = "shades-of-purple", | |
font = "Fira+Code", | |
lang = "auto", | |
drop_shadow = TRUE, | |
width = 680, |
This file contains 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
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n |
This file contains 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 all packages | |
pkgs <- installed.packages()[, 1] | |
# make progress bar | |
pb <- progress::progress_bar$new(total = length(pkgs)) | |
fcts <- purrr::map_df(pkgs, function(x) { | |
pb$tick() |
This file contains 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(tidycensus) | |
library(ggiraph) | |
library(tidyverse) | |
library(patchwork) | |
vt_income <- get_acs( | |
geography = "county", | |
variables = "B19013_001", | |
state = "VT", | |
year = 2019, |
- install unixodbc using homebrew
You can install homebrew here. Once that is done, run this in the terminal.
brew install unixodbc
- Download instant client from Oracle
This file contains 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) | |
# dummy list of dataframes | |
test <- data.frame("A" = NA, "B" = NA, "X" = NA) | |
test2 <- data.frame("D" = NA, "E" = NA, "F" = NA) | |
test3 <- data.frame("G" = NA, "H" = NA, "X" = NA) | |
combined_tests <- list(test = test, test2 = test2, test3 = test3) | |
# Turn list of dataframes into buckets of draggable blocks | |
rowBlock <- function(name) { |
This file contains 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
options(shiny.reactlog = TRUE) | |
library(shiny) | |
library(reactlog) | |
mod_iris_ui <- function(id) { | |
ns <- NS(id) | |
tagList( | |
fluidRow( | |
column( |
This file contains 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
#!/usr/bin/env RScript | |
messages <- purrr::map_chr(devtools::test(), | |
list("results", 1, "message")) | |
q("no", status = sum(messages != "success")) |
This file contains 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: "ggplot tutorial" | |
subtitle: "with Emi Tanaka's kunoichi + ninjutsu theme" | |
author: "<br><br>Gina Reynolds" | |
date: "<br>2018/09/16" | |
output: | |
xaringan::moon_reader: | |
chakra: libs/remark-latest.min.js | |
lib_dir: libs | |
css: ["kunoichi", "ninjutsu"] |
NewerOlder