Skip to content

Instantly share code, notes, and snippets.

View gadenbuie's full-sized avatar

Garrick Aden-Buie gadenbuie

View GitHub Profile
library(tidyverse)
r_ver <- jsonlite::read_json("https://rversions.r-pkg.org/r-versions")
r_ver %>%
map_dfr(~ .) %>%
separate(version, c("major", "minor", "patch"), "[.]") %>%
mutate(
version = paste(major, minor, patch, sep = '.'),
date = lubridate::ymd_hms(date),
date = lubridate::as_date(date)
@gadenbuie
gadenbuie / Count Code lines
Created September 10, 2021 14:31 — forked from amitchhajer/Count Code lines
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n

Keybase proof

I hereby claim:

  • I am gadenbuie on github.
  • I am grrrck (https://keybase.io/grrrck) on keybase.
  • I have a public key ASArjlnyx3yFbrIOKRtDNRtR5WGjOuV9OMXIA4kD-8NXZwo

To claim this, I am signing this object:

@gadenbuie
gadenbuie / find_all_errors.R
Created July 17, 2021 19:30 — forked from JBGruber/find_all_errors.R
Find error messages of all installed packages
# 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()
@gadenbuie
gadenbuie / xaringan-alt-text-background-image.Rmd
Last active May 28, 2021 21:27
make background images on slides accessible with alt text
---
title: "Accessible Background Image Demo"
output:
xaringan::moon_reader:
lib_dir: libs
css: [robot, robot-fonts]
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: false
library(tidycensus)
library(ggiraph)
library(tidyverse)
library(patchwork)
vt_income <- get_acs(
geography = "county",
variables = "B19013_001",
state = "VT",
year = 2019,
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
institute: "RStudio, PBC"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
library(shiny)
library(jsonlite)
# we'll store received data in a local json file
write_json(list(), "data.json")
post_handler <- function(req, response) {
# we'll catch everything that's POST for this demo but you'll want to make
# sure you don't step on shiny's built-in POST handlers
# (I'm pretty sure this handler is called after shiny's handlers but :shrug:)
---
output: github_document
params:
owner: tidyverse
repo: dplyr
comment_id: 313734872
---
```{r include=FALSE}
library(gh)
library(ggplot2)
library(thematic)
library(rsthemes) # remotes::install_github("gadenbuie/rsthemes")
rstheme(
theme_name = "Agent Orange",
ui_background = "#ee490b",
ui_foreground = "lighten($ui_background, 80%)",
code_string = "lighten(#f09475, 10%)",
code_function = "lighten(#f09d81, 10%)",