Skip to content

Instantly share code, notes, and snippets.

View hypercompetent's full-sized avatar

Lucas Graybuck hypercompetent

View GitHub Profile
@hypercompetent
hypercompetent / purrr_happy.R
Last active May 5, 2019 19:11 — forked from schnee/purrr_happy.R
What considerations are important in choosing between the two styles below? Interpretability, maintainability, speed, other?
library(purrr)
library(magrittr)
library(microbenchmark)
y_test <- sample(0:9, 2000, replace = TRUE)
pred1 <- sample(0:9, 2000, replace= TRUE)
pred2 <- sample(0:9, 2000, replace= TRUE)
preds <- list(pred1, pred2)
# want to apply the following to preds