Reading notes on Kill It with Fire by Marianne Bellotti
Another month, another long train trip enjoyed in the company of great books, among which a work-related one, Kill it with fire by Marianne Bellotti. As indicated by its subtitle “Manage Aging Computer Systems (and Future Proof Modern Ones)”, the book deals with handling legacy computer systems. The focus is on bigger projects (including serious internal politics) than what I usually deal with, but there’s some valuable lessons for any project size in there.
The current introduction to my package development workshops
I somewhat regularly teach about package development. One recent example was a workshop for rOpenSci champions. I am improving my teaching over time (thankfully 😅) but one thing I have down by now is the intro, which is mostly my throwing together my favorite quotes about R package development! Let me write it up. Where I explain why people shouldn’t flee the workshop After boasting a bit (a.k.a. sharing my package development creds to introduce myself), I answer three retorical questions:
Useful functions for dealing with object names
My sticky note filled up quickly after I only added setNames() on it, with related functions for dealing with object names, in base R and beyond! (Un)Setting object names: stats::setNames(), unname() and rlang::set_names() I noticed a function ending with something like this: blop <- function() { # code creating the df data.frame # ... names(df) <- c("col1", "col2") df } It struck me as simplifiable by:
Reading notes on Git in Practice by Mike McQuaid
While preparing materials for teaching Git a few months ago, I re-read Suzan Baert’s excellent post about Git and GitHub, where she mentioned having read “Git in Practice” by Mike McQuaid. I added the book to my Momox alerts, where it got available a few weeks later. The book source is on GitHub. The book isn’t too heavy, so I took it with me on a long train journey! 🚋
3 (actually 4) neat R functions
Time for me to throw away my sticky note after sharing what I wrote on it! grep(...) not which(grepl(...)) Recently I caught myself using which(grepl(...)), animals <- c("cat", "bird", "dog", "fish") which(grepl("i", animals)) #> [1] 2 4 when the simpler alternative is animals <- c("cat", "bird", "dog", "fish") grep("i", animals) #> [1] 2 4 And should I need the values instead of the indices, I know I shouldn’t write