Skip to content

Instantly share code, notes, and snippets.

View revodavid's full-sized avatar

David Smith revodavid

View GitHub Profile
# Run Simon Urbanek's benchmark v2.5
cat("R version\n")
cat("=========\n")
print(R.version)
if(exists("Revo.version")) {
cat("Revo version")
cat("============")
print(Revo.version)
@revodavid
revodavid / mtcars-cat.R
Created November 30, 2015 17:09 — forked from dill/mtcars-cat.R
categorical emojis -- like this Mark?
library(emoGG)
library(ggplot2)
# set the am variable to be different emoji
mtcars$am[mtcars$am==1] <- "1f697"
mtcars$am[mtcars$am==0] <- "1f68c"
# use am as the emoji aesthetic
ggplot(mtcars, aes(wt, mpg, emoji=am))+ geom_emoji()
@revodavid
revodavid / CRAN_pkg_history.R
Last active May 1, 2021 12:58 — forked from andrie/CRAN_pkg_history.R
Scrapes CRAN for historical number of packages per release
# Scrapes CRAN archives to determine the number of packages per release
# Create a list of pages to scrape, including both archive and current
extract_url <- function() {
url <- list(
archive = "https://cran-archive.r-project.org/bin/windows/contrib/",
active = "https://cran.r-project.org/bin/windows/contrib/"
)
get_urls <- function(url) {